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.RotateAround 围绕旋转
function RotateAround (point : Vector3, axis : Vector3, angle : float) : void
Description描述
Rotates the transform about axis passing through point in world coordinates by angle degrees.
按照angle度通过在世界坐标的point轴旋转物体。
简单的说,按照多少度在世界坐标的某位置轴旋转物体。
This modifies both the position and the rotation of the transform.
这个修改变换的位置和旋转角度。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Update() {
transform.RotateAround(Vector3.zero, Vector3.up, 20 * Time.deltaTime);
}
}
function Update() {
// Spin the object around the world origin at 20 degrees/second.
//围绕世界坐标原点,每秒20度物体自旋
transform.RotateAround (Vector3.zero, Vector3.up, 20 * Time.deltaTime);
}
最后修改:2010年12月19日 Sunday 14:48