Creates a new RigidBody component.
Configuration for the rigid body
OptionalactorThe actor that has this component. It is undefined until the component is
added to an actor.
Angular 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
Surface friction used by contact resolution. Higher values reduce sliding more strongly.
Surface friction used by contact resolution. Higher values reduce sliding more strongly.
Advanced
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.
Advanced
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.
Advanced
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.
Advanced
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.
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.
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.
Returns the component of the same class on the parent actor.
The component, or undefined if the actor has no parent actor or
the parent has no such component.
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.
Makes an actor take part in physics.
typedecides what moves the body: the simulation or your code.See
Bodies and colliders