角色控制器主要用于第三人称或第一人称游戏主角控制,并不使用刚体物理效果。
The Character Controller 角色控制器示例
Properties 属性
-
Height
高度The Character's Capsule Collider height. Changing this will scale the collider along the Y axis in both positive and negative directions.
角色的胶囊碰撞器高度。改变其大小会使碰撞器在Y轴方向3两端伸缩。 -
Radius
半径Length of the Capsule Collider's radius. This is essentially the width of the collider.
胶囊碰撞器的半径长度。级碰撞器的宽度。 -
Slope Limit
坡度限制Limits the collider to only climb slopes that are equal to or less than the indicated value.
限制碰撞器只能爬小于等于该值的斜坡。 -
Step Offset
台阶高度The character will step up a stair only if it is closer to the ground than the indicated value.
角色可以迈上的最高台阶高度。 -
Min Move Distance
最小移动距离If the character tries to move below the indicated value, it will not move at all. This can be used to reduce jitter. In most situations this value should be left at 0.
如果角色移动的距离小于该值,那角色就不会移动。这可以避免颤抖现象。大部分情况下该值被设为0。 -
Skin width
皮肤厚度Two colliders can penetrate each other as deep as their Skin Width. Larger Skin Widths reduce jitter. Low Skin Width can cause the character to get stuck. A good setting is to make this value 10% of the Radius.
皮肤厚度决定了两个碰撞器可以互相渗入的深度。较大的皮肤厚值度会导致颤抖。小的皮肤厚度值会导致角色被卡住。一个合理的设定是使该值等于半径(Radius)的10%。 -
Center
中心This will offset the Capsule Collider in world space, and won't affect how the Character pivots.
该值决定胶囊碰撞器在世界空间中的位置,并不影响角色的行动。