Rigidbody

Rigidbody

Physics
Componente
Añadible:
Collider
Combinar:
entity
Exclusivo:
Character Controller

Rigid body components

Propiedades

Nombre Tipo Descripción Nombre del script
Type Rigidbody Type Functions of different types of rigid bodies Type
Use Gravity Bool Use Gravity UseGravity
Mass (kg) Float Mass (kg), the minimum effective mass is 0.001kg, if it is 0, then it is infinite mass and will not move under force. Mass
Center of Mass Vector3 Solo lectura
Position of the center of gravity, local coordinate system
CenterOfMass
Velocity (m/s) Vector3 Linear velocity of rigid body motion Velocity
Angular Velocity (rad/s) Vector3 Angular velocity of rigid body motion AngularVelocity
Drag Float Coefficient of natural decay of linear velocity, the larger the coefficient, the faster the decay of velocity. Drag
Angular Drag Float Angular velocity natural decay coefficient, the larger the coefficient, the faster the velocity decays. AngularDrag
Constrain Int The constraints imposed on the rigid body, a collection of RigidbodyConstrainType. Constrain

API

Nombre Descripción
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 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