天天看點

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: 變換幅度

繼續閱讀