最終更新:2019-11-27 (水) 17:59:51 (1615d)  

Vector3.MoveTowards
Top / Vector3.MoveTowards

現在地から目的地まで一定速度で移動させてくれる関数

https://docs.unity3d.com/ja/2017.4/ScriptReference/Vector3.MoveTowards.html

public static Vector3 MoveTowards (Vector3 current, Vector3 target, float maxDistanceDelta);
  • maxDistanceDelta?:1フレームの最大移動距離(=速度)
    float step = speed * Time.deltaTime;