LanguageEnglish
  • C#
  • JS

Script language

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

This version of Unity is unsupported.

Vector4.MoveTowards

public static Vector4 MoveTowards(Vector4 current, Vector4 target, float maxDistanceDelta);

Description

Moves a point current towards target.

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