Transform.right 向右


var right   : Vector3

Description描述

The red axis of the transform in world space.

在世界空间坐标变换的红色轴。也就是x轴。

  • C#

  • JavaScript

using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {rigidbody.velocity = transform.right * 10;}}
// Set's the rigidbody velocity to be// along the red axis of the transform//设置刚体的速度沿着物体的红色轴移动rigidbody.velocity = transform.right * 10;


,