moveTowards
Moves a point from towards a target point by a maximum distance specified by maxDistanceDeltaInput.
The maxDistanceDeltaInput is clamped to be non-negative; if a negative value is provided, it's treated as 0.0f (resulting in no movement unless from is already at target).
If
fromis already attarget, or iftargetis within the (non-negative)maxDistanceDeltadistance, this function returnstarget.If
maxDistanceDelta(after clamping) is0.0fandfromis not attarget, this function returnsfrom(no movement).Otherwise,
fromis moved along the straight line towardstargetby exactlymaxDistanceDeltaunits.
Return
A new Vector3 instance representing the new position after moving.
Parameters
The starting point (Vector3).
The destination point (Vector3) towards which from is moved.
The maximum distance from should move. Negative values are effectively treated as 0.0f.