用户工具

站点工具


侧边栏

script:unityengine:classes:transform:transform.right

Transform.right 向右

JavaScript ⇒ var right: Vector3;
C# ⇒ Vector3 right;

Description 描述

The red axis of the transform in world space.

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

JavaScript:

	// Set's the rigidbody velocity to be 
	// along the red axis of the transform
	rigidbody.velocity = transform.right * 10;

C#:

using UnityEngine;
using System.Collections;
 
public class ExampleClass : MonoBehaviour {
    void Example() {
        rigidbody.velocity = transform.right * 10;
    }
}

Transform

script/unityengine/classes/transform/transform.right.txt · 最后更改: 2016/08/02 05:37 (外部编辑)