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.up 向上
var up : Vector3
Description描述
The green axis of the transform in world space.
在世界空间坐标变换的绿色轴。也就是y轴。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
rigidbody.velocity = transform.up * 10;
}
}
// Set's the rigidbody velocity to be
// along the green axis of the transform
//设置刚体的速度沿着物体的绿色轴移动
rigidbody.velocity = transform.up * 10;
最后修改:2010年12月18日 Saturday 22:55