IN THIS ARTICLE

PhysX Rigid Body Component

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

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

Kinematic rigid bodies are not fully simulated 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 Rigid Body component to the top level of an entity hierarchy. Adding the PhysX 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 Rigid Body component interface.

PropertyDescriptionValueDefault
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 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 dynamic rigid bodies.BooleanEnabled
KinematicIf enabled, the rigid body is kinematic. A kinematic rigid body is not affected by gravity or other forces and can be moved by script. If disabled, the rigid body is dynamic. A dynamic rigid body responds to collision events and forces, and its motion is simulated by PhysX.BooleanDisabled
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 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