找回密码
 注册帐号

扫一扫,访问微社区

capsulecollider.direction 胶囊碰撞器 方向

2015-1-4 09:27| 发布者: 杨炎| 查看: 2120| 评论: 0|原作者: 蛮牛|来自: unity3d脚本manual

摘要: capsulecollider.direction 方向vardirection: intdescription描述the direction of the capsule.胶囊的方向。0 -> capsule height is along the x-axis. 1 -> capsule height is along the y-axis. 2 -> capsule he ...

capsulecollider.direction 方向

vardirection: 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轴。

c#

javascript

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;

相关阅读

文章点评
相关文章