Creates a new RigidBody component.
Configuration for the rigid body
Internal_Angular impulse applied to the rigid body
Internal_Temporary solver angular velocity used for contact separation
Internal_Temporary solver velocity used for contact separation
Internal_Force applied at the rigid body center
Internal_Impulse applied at the rigid body center
Internal_Pending one-step kinematic movement target
Internal_Forces applied at world-space positions
Internal_Impulses applied at world-space positions
Internal_Angular velocity from the start of the current physics step
Internal_Linear velocity from the start of the current physics step
Internal_Torque applied to the rigid body
OptionalactorAngular damping used to slow down rotation over time
Current angular velocity of the rigid body in radians per second
Whether rigid body simulation is disabled
Gravity multiplier. 0 ignores gravity, 1 uses normal world gravity.
Linear damping used to slow down movement over time
Current linear velocity in world units per second
Whether dynamic rotation is locked. Locked bodies do not spin from torque or contacts.
Whether contacts should only be resolved from one side
OptionaloneLocal-space normal that points toward the blocking side
ReadonlytypeBody type that defines how the rigid body participates in simulation
StaticcomponentSurface friction used by contact resolution. Higher values reduce sliding more strongly.
Moment of inertia used by dynamic bodies.
Inertia is the rotational equivalent of mass: higher values make the body harder to spin. It is automatically computed from the collider shape, mass, and collider offset every physics step, so user code usually should only read this value.
Returns the inverse moment of inertia.
This is the solver-friendly form of inertia. Static bodies, kinematic
bodies, locked rotation, or non-positive inertia return 0.
Returns the inverse mass.
Bodies with zero or negative mass return 0.
Sets the mass used by dynamic bodies.
Mass is an authored, kilogram-like scalar. Non-positive values make the body immovable by forces and impulses.
Bounciness used by contact resolution. 0 does not bounce, 1 keeps full bounce speed.
Adds an instantaneous angular impulse to a dynamic body for the next physics step.
Angular impulse is an immediate rotational kick. Affects only active dynamic bodies with unlocked rotation.
Adds an instantaneous impulse to a dynamic body for the next physics step.
Affects only active dynamic bodies. An impulse is a one-step velocity kick.
When position is provided, it is a world-space point where the impulse is
applied; off-center impulses can also rotate the body.
Adds a continuous torque to a dynamic body for the next physics step.
Torque is rotational force: it changes angular velocity over time. Affects only active dynamic bodies with unlocked rotation.
Clears all accumulated force and impulse values.
Moves a kinematic body to a target position on the next physics step.
The physics system computes a one-step velocity from the current position to this target so contacts can react to the kinematic movement.
RigidBody component for defining rigid body physics.
Defines the physics properties for an actor. Dynamic bodies react to forces, impulses, gravity, collisions, and rotation. Static and kinematic bodies can participate in collisions but are not moved by solver impulses.
Physics is simulated in world space.
Rigid bodies may be parented only to actors with static transforms. A moving parent (for example, a dynamic or kinematic rigid body) and the physics simulation would both control the child's transform, so the result is undefined.
Example