Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Vector4.MoveTowards

Switch to Manual
public static function MoveTowards(current: Vector4, target: Vector4, maxDistanceDelta: float): Vector4;

Parameters

Description

Moves a point current towards target.

This is essentially the same as Vector4.Lerp but instead the function will ensure that the speed never exceeds maxDistanceDelta. Negative values of maxDistanceDelta pushes the vector away from target.