用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:charactercontroller:charactercontroller

CharacterController 角色控制器

Namespace: UnityEngine
Inherits from: Collider

Description 描述

A CharacterController allows you to easily do movement constrained by collisions without having to deal with a rigidbody.

角色控制器让你在受制于碰撞的情况下很容易的进行运动,而不用处理刚体。

A CharacterController is not affected by forces and will only move when you call the Move funtion. It will then carry out the movement but be constrained by collisions.

角色控制器不受力的影响,仅当你调用Move函数时才运动。它执行运动,但是受制于碰撞。

See Also: Character Controller component and Character animation examples

Variables 变量

centerThe center of the character's capsule relative to the transform's position.
相对于变换位置的角色胶囊体的中心。
collisionFlagsWhat part of the capsule collided with the environment during the last CharacterController.Move call.
在最后的CharacterController.Move调用期间,胶囊体的哪个部分与周围环境相碰撞。
detectCollisionsDetermines whether other rigidbodies or character controllers collide with this character controller (by default this is always enabled).
检测其他的刚体和角色控制器是否与本角色控制器相碰撞(默认值始终启用)。
heightThe height of the character's capsule.
角色胶囊体的高度。
isGroundedWas the CharacterController touching the ground during the last move?
在最后一次移动角色控制器是否触碰地面?
radiusThe radius of the character's capsule.
角色胶囊体的半径。
slopeLimitThe character controllers slope limit in degrees.
角色控制器的坡度度数限制。
stepOffsetThe character controllers step offset in meters.
以米为单位的角色控制器的台阶偏移量。
velocityThe current relative velocity of the Character (see notes).
角色当前的相对速度。

Public Functions 共有函数

MoveA more complex move function taking absolute movement deltas.
一个更加复杂的运动函数,采取绝对的运动增量。
SimpleMoveMoves the character with speed.
根据速度speed移动角色。

Messages 消息

OnControllerColliderHitOnControllerColliderHit is called when the controller hits a collider while performing a Move.
当角色控制器碰到一个可执行移动的碰撞器时,OnControllerColliderHit被调用。
script/unityengine/classes/charactercontroller/charactercontroller.txt · 最后更改: 2016/08/02 05:28 (外部编辑)