Physics

Módulo requerido

Componentes y propiedades

Nombre Descripción
Rigidbody Type Rigidbody Type
Rigidbody Rigid body components
Rigidbody Constrain Type Rigid body motion constraints, each of which can be used in combination
Force Type Several different effects of rigid body forces. Note that this only works for Dynamic types.
Character Controller Player controller with physics effects to apply forces.
Player CCT Character Controller with Physical Effects, for FF characters only.
Physical Mover Entities with PhysicalCCT or PlayerCCT components can move along with them.
Physical Object Entities with PhysicalCCT or Rigidbody component
Ray Cast Layer Type[Obsoleto] (Deprecated, please do not use)

Event

Nombre Descripción
On Entity Enter Triggered when an entity enters a trigger. When a trigger event is triggered, both parties receive the event. One party must be a rigid body and the other party must be a trigger. In particular, when the trigger is a custom trigger object, only the trigger will receive the event.
On Entity Exit Triggered when the entity leaves the trigger. When the event is triggered, both parties receive the event. One party must be a rigid body and the other party must be a trigger. In particular, when the trigger is a custom trigger object, only the trigger will receive the event.
On Collision Enter Triggered when an entity collides. Only entities with rigidbody components attached support this event.
On Collision Exit Triggered when the entity collision ends. Only entities with rigidbody components attached support this event.
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
Is Inside Sphere Determines whether the target entity is within the specified sphere. If the entity has no position attribute, it will return false.
Is Inside Cylinder Determine whether the target entity is within the specified cylindrical range. If the entity has no position attribute, it will return false.
Is Inside Box Determine whether the target entity is within the specified cube range
Is Inside Sector Determine whether the target entity is within the specified fan-shaped cylinder range
Single Raycast Perform a ray detection and return the first entity hit in the ray direction. The hit entity needs to have a collision component. If the level parameter is filled in, the terrain can be detected.
Multi-Raycast Perform a ray detection and return all entities hit in the ray direction from near to far. If the level parameter is filled in, the terrain can be detected.
Box Cast Use a box-shaped area with linear motion for detection, and return all entities encountered on the route of the box-shaped area from near to far. If they are initially within the box range, they will not be detected; if the level parameter is filled in, the terrain can be detected
Sphere Cast Use a spherical area with linear motion for detection, and return all entities encountered on the route of the spherical area from near to far. If they are initially in the spherical area, they will not be detected; if the level parameter is filled in, the terrain can be detected
Capsule Cast Use a linear capsule area for detection, returning all entities encountered on the route of the capsule area from near to far. If they are initially in the capsule area, they will not be detected; if the level parameter is filled in, the terrain can be detected
Box Overlap Use a static box-shaped area for detection and return all entities within the box-shaped area. If the level parameter is filled in, the terrain can be detected.
Sphere Overlap Use a static spherical area for detection and return all entities in the spherical area. If the level parameter is filled in, the terrain can be detected.
Capsule Overlap Use a static capsule area for detection and return all entities in the capsule area. If the level parameter is filled in, the terrain can be detected.
Add Force Apply a force to the target. The target must be a physical object.
Add Force At Position Apply a force at a point. The target must be a rigidbody.
Add Torque Apply a torque to the target. The target must be a rigidbody.
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.
Move Position Move the target rigidbody to the specified position
Move Rotation Rotate the target rigidbody
Sleep Sleep target, only available for Dynamic type rigid body
Wake Up Wake up the target, only available for Dynamic type rigid bodies
Is Sleeping Check if the target rigidbody is in sleep state
Set Sleep Threshold Setting the sleep threshold
Get Sleep Threshold Get the sleep threshold
Set Global Sleep Threshold Set the global sleep threshold, which is only valid for newly generated Dynamic rigid bodies.
Get Global Sleep Threshold Get the global sleep threshold