Menu
Lumberyard
User Guide (Version 1.14)

Rag Doll

Component entity system is in preview release and is subject to change.

The Rag Doll component uses physics to drive characters. This component is the ideal alternative to animation for simulating environmental effects upon unconscious characters. To use the rag doll component, you need assets that were authored in external 3D modeling programs.

Rag Doll Component Properties

The Rag Doll component has the following properties:

Enabled initially

When selected, starts the entity as a rag doll.

Use physics component mass

When selected, the entity attempts first to use mass set by a physics component. If not selected, or no component is found, defaults to Mass.

Mass

Simulated mass for the entity. Its use is determined by the Use physics component mass setting.

Collides with characters

When selected, collides the entity with characters.

 

The following properties affect the damping of the entity. Damping is defined as a reduction in the amplitude of an oscillation or vibration.

Damping

Amount of physical force applied against the energy in the system to drive the entity to rest.

Damping during free fall

Amount of damping applied while in the air.

Time until at rest

Time without applied forces before physics is deactivated for this entity.

Grounded time until at rest

Amount of time the entity is on the ground before physics is deactivated for this entity.

Grounded required points of contact

The required number of contact points before the entity is considered grounded.

Grounded damping

Damping applied while grounded.

 

The following are Advanced properties for the rag doll component.

Max time step

Maximum time between steps for the physics simulation for this entity.

Stiffness scale

The amount of stiffness to apply to the joints.

Skeletal level of detail

Level of detail to apply to the entity. Default is 1, the lowest level of detail you can achieve.

Retain joint velocity

When selected, joint velocities are conserved at the instant of ragdolling.

 

The following properties control entity's Buoyancy—how it behaves in water or other liquids or fluids.

Fluid density

The density (kg per cubic meter) of the rag doll for fluid displacement.

The default is 1,000, which is the approximate density of water at 1 atmosphere. By contrast, platinum is approximately 22,000 kg per cubic meter.

Fluid damping

The amount of damping applied while the entity is in fluid.

Fluid resistance

The amount of resistance applied while the entity is in fluid.

EBus Request Bus Interface

Use the following request functions with the EBus interface to communicate with other components of your game.

For more information about using the Event Bus (EBus) interface, see Working with the Event Bus (EBus) System.

EnterRagdoll

Disables current physics and enables rag doll physics on an entity with a skinned mesh component.

Parameters

None

Return

None

Scriptable

Yes

ExitRagdoll

Disables rag doll physics and reenables the entity's physics component.

Parameters

None

Return

None

Scriptable

Yes

The following is an example of script using the Request Bus Interface.

RagdollPhysicsRequestBus.Event.EnterRagdoll(self.entityId) RagdollPhysicsRequestBus.Event.ExitRagdoll(self.entityId)