Version:

IN THIS ARTICLE

PhysX Dynamic Rigid Body Component

The PhysX Dynamic Rigid Body component makes an entity a simulated or kinematic solid object that can move and collide with other PhysX entities. The entity must also have at least one PhysX Shape Collider, PhysX Primitive Collider or PhysX Mesh Collider component that defines a collider for the entity.

Simulated rigid bodies are fully driven by PhysX. Simulated rigid bodies move in response to collision events and forces and are not animated through motions or scripts. By default, simulated rigid bodies are affected by gravity, but gravity can be deactivated in the PhysX Dynamic Rigid Body component.

Kinematic rigid bodies are not fully driven by PhysX. They have scripted animation and are not affected by forces or gravity. Doors, for example, often have scripted animation. If the door is a kinematic rigid body, the door can move through scripted animation and collide with other PhysX entities during simulation. Movement is created with the SetKinematicTarget method that you specify in a script.

Note:
You should always add the PhysX Dynamic Rigid Body component to the top level of an entity hierarchy. Adding the PhysX Dynamic Rigid Body component to a child entity can cause conflicts with the entity’s world transform and result in undefined behavior.

Provider

PhysX Gem

Properties

PhysX Dynamic Rigid Body component interface.

PropertyDescriptionValueDefault
TypeDetermines how the movement/position of the rigid body is controlled. A simulated rigid body responds to collision events and forces, and its motion is simulated by PhysX. A kinematic rigid body is not affected by gravity or other forces and can be moved by script.Simulated, KinematicSimulated
Initial linear velocitySets the starting linear velocity (in meters per second) of the rigid body when the entity is activated. This creates movement in the direction of the linear velocity vector.Vector3: -Infinity to InfinityX: 0.0, Y: 0.0, Z: 0.0
Initial angular velocitySets the starting angular velocity (in radians per second) of the rigid body when the entity is activated. This creates rotation in the direction of the angular velocity vector.Vector3: -Infinity to InfinityX: 0.0, Y: 0.0, Z: 0.0
Linear dampingSets the rate of decay over time for linear velocity even if no forces are acting on the rigid body. A non-zero value eventually stops the rigid body if no linear force is applied. Value must be non-negative.Float: 0 to Infinity0.05
Angular dampingSets the rate of decay over time for angular velocity even if no forces are acting on the rigid body. A non-zero value eventually stops the rigid body if no torque force is applied. Value must be non-negative.Float: 0.0 to Infinity0.15
Sleep thresholdSets the kinetic energy per unit mass below which the rigid body can go to sleep. Value must be non-negative.Float: 0.0 to Infinity0.005
Start asleepIf enabled, the PhysX Dynamic Rigid Body component is asleep when the entity is activated and wakes when a sufficient force is applied.BooleanDisabled
Interpolate motionIf enabled, the resulting motion from the simulation is smoothed. Enable this property for objects that require smooth motion such as vehicles.BooleanDisabled
Gravity enabledIf enabled, the rigid body is affected by gravity. This only applies to simulated rigid bodies.BooleanEnabled
CCD enabledIf enabled, continuous collision detection (CCD) is performed. This property is useful for high speed objects to ensure accurate collision detection. Activating this property reveals two additional properties, Min advance coefficient and CCD Friction. To use continuous collision detection, you must also activate Continuous Collision Detection in the PhysX Configuration window. For more information, refer to PhysX Configuration.BooleanDisabled
Min advance coefficientFine-tune continuous collision detection. Lower values reduce clipping but can affect motion smoothness.Float: 0.01 to 0.990.15
CCD frictionIf enabled, friction is applied when CCD collisions are resolved.BooleanDisabled
Compute massIf enabled, mass is computed for the rigid body.BooleanDisabled
Linear Axis - Lock XIf enabled, forces won’t create translation on the X-axis of the rigid body.BooleanDisabled
Linear Axis - Lock YIf enabled, forces won’t create translation on the Y-axis of the rigid body.BooleanDisabled
Linear Axis - Lock ZIf enabled, forces won’t create translation on the Z-axis of the rigid body.BooleanDisabled
Angular Axis - Lock XIf enabled, forces won’t create rotation on the X-axis of the rigid body.BooleanDisabled
Angular Axis - Lock YIf enabled, forces won’t create rotation on the Y-axis of the rigid body.BooleanDisabled
Angular Axis - Lock ZIf enabled, forces won’t create rotation on the Z-axis of the rigid body.BooleanDisabled
MassIf Compute Mass is disabled, a Mass value can be specified for the PhysX Dynamic Rigid Body in kilograms.Float: 0.0 to Infinity1.0
Compute COMIf enabled, the center of mass is automatically computed for the rigid body.BooleanEnabled
COM offsetIf Compute COM is disabled, the center of mass can be specified as an offset.Vector3: -Infinity to InfinityX: 0.0, Y: 0.0, Z: 0.0
Compute inertiaIf enabled, inertia is computed based on the mass and shape of the rigid body.BooleanEnabled
Inertia diagonalIf Compute inertia is disabled, an Inertia diagonal can be specified as the diagonal elements of the inertia tensor. This is the torque required to rotate the rigid body on each axis.Vector3: 0.0 to InfinityX: 1.0, Y: 1.0, Z: 1.0
Maximum angular velocityClamps angular velocity to the specified value. This is useful in scenarios where the rigid body rotates at an unrealistically fast angular velocity.Float: 0.0 to Infinity100.0
Include non-simulated shapes in MassIf enabled, non-simulated shapes are included in the mass, center of mass, and inertia calculations.BooleanDisabled
Debug draw COMIf enabled, the center of mass for this rigid body is displayed.BooleanDisabled
Solver Position IterationsNumber of iterations used when computing the body’s position update. Higher values may increase simulation fidelity, but will increase computational cost.Integer: 1 to 2554
Solver Velocity IterationsNumber of iterations used when computing the body’s velocity update. Higher values may increase simulation fidelity, but will increase computational cost.Integer: 1 to 2551