Vector3.MoveTowards||doc136386

September 20, 2022

Format

Vector3.MoveTowards(fromVec, toVec, moveDistance)

Describe

Calculate the vector after a certain vector moves the specified distance to the target vector, and it will not exceed the target vector. It can be used to make uniform approximation effect.

parameter

Variable name Type Describe
fromVec Vector3 Starting vector
toVec Vector3 Endpoint vector
moveDistance float Movement amount

Return value

Type Describe
Vector3 Vector after moving