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.position 位置
var position : Vector3
Description描述
The position of the transform in world space.在世界空间坐标transform的位置。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
transform.position = new Vector3(0, 0, 0);
print(transform.position.x);
}
}
// Move the object to (0, 0, 0)
//移动物体到(0, 0, 0)
transform.position = Vector3(0, 0, 0);
// Print the x component of the position to the Console
//打印位置的x组件
print(transform.position.x);
最后修改:2010年12月18日 Saturday 21:36