Unity 之 transform
transform.Translate
1、function Translate (translation : Vector3, relativeTo : Space = Space.Self) : void)
Move the object forward along its z axis 1 unit/second. //沿着z轴1单位/秒,向前移动物体 transform.Translate(Vector3.forward * Time.deltaTime); // Move the object upward in world space 1 unit/second. //在世界坐标沿着y轴1单位/秒,向上移动物体 transform.Translate(Vector3.up * Time.deltaTime, Space.World);