天天看点

unity3d 逐帧旋转和平移 Vector3.MoveTowards和Vector3.RotateTowards

参数解析

public static Vector3.MoveTowards(Vector3 current,Vector target,float maxDistanceDelta)

current: 当前位置

target: 将要移动到的位置

maxDistanceDelta: 移动速度

public static Vector3.RotateTowards(Vector3 current, Vector3 target, float maxRadiansDelta, float maxMagnitudeDelta)

current: 当前位置

target: 将要移动到的位置

maxRadiansDelta: 角速度

maxMagnitudeDelta: 变换幅度

继续阅读