Transform
- childCount
- DetachChildren
- eulerAngles
- Find
- forward
- InverseTransformDirection
- InverseTransformPoint
- IsChildOf
- localEulerAngles
- localPosition
- localRotation
- localScale
- localToWorldMatrix
- LookAt
- lossyScale
- parent
- position
- right
- root
- RotateAround
- Rotate
- rotation
- TransformDirection
- TransformPoint
- Translate
- up
- worldToLocalMatrix
Transform.right 向右
var right : Vector3
Description描述
The red axis of the transform in world space.
在世界空间坐标变换的红色轴。也就是x轴。
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;
最后修改:2010年12月18日 Saturday 22:53