Class Ragdoll
Actor that synchronizes Animated Model skeleton pose with physical bones bodies simulated with physics. Child rigidbodies are used for per-bone simulation - rigidbodies names must match skeleton bone name and should be ordered based on importance in the skeleton tree (parents first).
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Level/Actors/Ragdoll.h
Syntax
public class Ragdoll : public Actor
Fields
BonesWeight
The default bones weight where 0 means fully animated bone and 1 means fully simulate bones. Can be used to control all bones simulation mode but is overriden by per-bone BonesWeights.
Declaration
public float BonesWeight = 1.0f
Field Value
float
|
BonesWeights
The per-bone weights for ragdoll simulation. Key is bone name, value is the blend weight where 0 means fully animated bone and 1 means fully simulated bone. Can be used to control per-bone simulation.
Declaration
public Dictionary<String, float> BonesWeights
Field Value
Dictionary<String, float>
|
MaxDepenetrationVelocity
The maximum depenetration velocity when ragdoll's rigidbody moving out of penetrating state. Using this property can smooth objects moving out of colliding state and prevent unstable motion.
Declaration
public float MaxDepenetrationVelocity = MAX_float
Field Value
float
|
See Also
PositionSolverIterations
The minimum number of position iterations the physics solver should perform for bodies in this ragdoll. Higher values improve stability but affect performance.
Declaration
public uint8 PositionSolverIterations = 8
Field Value
uint8
|
See Also
VelocitySolverIterations
The minimum number of velocity iterations the physics solver should perform for bodies in this ragdoll. Higher values improve stability but affect performance.
Declaration
public uint8 VelocitySolverIterations = 2
Field Value
uint8
|
See Also
Methods
GetTotalMass()
Calculates the total mass of all ragdoll bodies.
Declaration
public float GetTotalMass() const
Returns
float
|
OnDebugDrawSelected()
Draws debug shapes for the selected actor and all child scripts.
Declaration
public virtual void OnDebugDrawSelected() override
Overrides
OnDisable()
Called when actor gets removed from game systems. Occurs on EndPlay event or when actor gets inactivated in hierarchy. Use this event to unregister object from other game system (eg. audio).
Declaration
public virtual void OnDisable() override
Overrides
OnEnable()
Called when actor gets added to game systems. Occurs on BeginPlay event or when actor gets activated in hierarchy. Use this event to register object to other game system (eg. audio).
Declaration
public virtual void OnEnable() override
Overrides
OnParentChanged()
Called when actor parent gets changed.
Declaration
public virtual void OnParentChanged() override
Overrides
OnTransformChanged()
Called when actor transform gets changed.
Declaration
public virtual void OnTransformChanged() override
Overrides
SetAngularVelocity(const Vector3& value)
Sets the angular velocity of all rigidbodies in the ragdoll (in radians per second).
Declaration
public void SetAngularVelocity(const Vector3& value) const
Parameters
Vector3
value
|
SetLinearVelocity(const Vector3& value)
Sets the linear velocity of all rigidbodies in the ragdoll.
Declaration
public void SetLinearVelocity(const Vector3& value) const
Parameters
Vector3
value
|