CapsuleCollider.direction 方向

var direction : int

Description描述

The direction of the capsule.

胶囊的方向。

0 -> Capsule height is along the x-axis. 1 -> Capsule height is along the y-axis. 2 -> Capsule height is along the z-axis.

0表示胶囊的高度沿着x轴;1表示胶囊的高度沿着y轴;2表示胶囊的高度沿着z轴。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		collider.direction = 0;
	}
}
// Make the capsule height be along the x-axis
//使胶囊的高度沿着x轴
collider.direction = 0;
Page last updated: 2011-5-10