MoveTowards(Vector4, Vector4, float)
Moves a point current towards target.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public static Vector4 MoveTowards(Vector4 current, Vector4 target, float maxDistanceDelta)
Parameters
Returns
Type | Description |
|---|---|
| Vector4 | The new position, moved from |
Remarks
This is essentially the same as Vector4.Lerp but instead the method ensures that the distance moved never exceeds . Negative values of pushes the vector away from .
maxDistanceDeltamaxDistanceDeltatarget