Character Controller

CharacterController

Physics
Componente
Añadible:
Custom Object
Combinar:
entity
Exclusivo:
Collider
Collider Collection
Rigidbody

Player controller with physics effects to apply forces.

Propiedades

Nombre Tipo Descripción Nombre del script
Use Physical CCT Bool Whether to use a player controller with physics effects UsePhysicalCCT
Slope Limit Float Placed on a slope above this angle, it will slide downward SlopeLimit
Step Offset Float Only obstacles above this height will have a blocking effect, in the range [0,Height] StepOffset
Skin Width Float Allows embedding to change the depth of the capsule body. It can prevent the character from getting stuck or shaking, and is not recommended to be changed without special needs. Value range (0,Radius] SkinWidth
Min. Move Distance Float Minimum movement distance, any movement less than this value will not be executed. If there is no special need, it is recommended to keep it at 0. MinMoveDistance
Center Offset Vector3 Solo lectura
The offset of the center of the collision box from the local coordinate origin.
CenterOffset
Radius Float Radius of the capsule, minimum value 0.01. Radius
Height Float Total height of the capsule, including the upper and lower hemispheres, min. 2*Radius Height
Velocity (m/s) Vector3 Solo lectura
Current linear velocity, in m/s
Velocity
Max Speed Float (Deprecated, please do not use) MaxSpeed
Gravity Vector3 This gravity acceleration is only applied to this player’s controller. Gravity
Mass (kg) Float Mass in kg Mass
Is Sliding Bool Solo lectura
If the slope exceeds the maximum uphill angle, the capsule will slide downward.
IsSliding
Is Top Colliding Bool Solo lectura
(Deprecated, please do not use)
IsTopColliding
Is Side Colliding Bool Solo lectura
(Deprecated, please do not use)
IsSideColliding
Is Bottom Colliding Bool Solo lectura
(Deprecated, please do not use)
IsBottomColliding
Is Server-Driven Bool When enabled, movement is controlled by server-side blocks or scripts. IsServerDriven
Use Custom Push Force Bool When enabled, the force applied when the character pushes on a rigid body can be customized. UseCustomPushForce
Custom Push Force Float The amount of force applied when the character pushes the rigid body CustomPushForce
Is Grounded Bool Solo lectura
True when the lower part of the body touches the collision body, usually used to determine if the player is on the ground.
IsGrounded
Physical Layer Int Solo lectura
Customizable physics level, value [0,15].
PhysicalLayer
Enable Rotate With Gravity Bool Solo lectura
Enable Rotate With Gravity
EnableRotateWithGravity

Event

Nombre Descripción
On Character Controller Hit Triggered when the player controller touches an entity. This is only triggered when the controller actively moves.

API

Nombre Descripción
Move CCT Displace the character controller once. If it acts on the player,the player must turn on the physical CCT for it to take effect.
Move CCT[Obsoleto] Deprecated
Teleport CCT Move the character controller to the specified position. If it acts on the player,the player must turn on the physical CCT for it to take effect.