transform.Translateの移動方向(ローカル座標、ワールド座標)

2022年12月17日

transform.Translateの動作

transform.Translate(Vp, t)

Vector3 Vp(x, y, z)の方向・距離へ移動します。
t省略時は「t = Space.Self」となります。
t = Space.Self:ローカル座標系を基準に移動します。
t = Space.World:ワールド座標系を基準に移動します。

サンプル

 transform.Translate(new Vector3(1,2,3),Space.World);

Unity

Posted by hidepon