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).
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[ActorToolbox("Physics")]
[Unmanaged]
public class Ragdoll : Actor, ISerializable
Constructors
Ragdoll()
Properties
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
[EditorOrder(10)]
[EditorDisplay("Ragdoll", null)]
[Limit(0F, 1F, 1F)]
[Unmanaged]
public float BonesWeight { get; set; }
Property Value
System.Single
|
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
[EditorOrder(20)]
[EditorDisplay("Ragdoll", null)]
[Unmanaged]
public Dictionary<string, float> BonesWeights { get; set; }
Property Value
System.Collections.Generic.Dictionary<System.String, System.Single>
|
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
[EditorOrder(120)]
[EditorDisplay("Ragdoll", null)]
[Limit(0F, 3.40282347E+38F, 1F)]
[Unmanaged]
public float MaxDepenetrationVelocity { get; set; }
Property Value
System.Single
|
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
[EditorOrder(100)]
[EditorDisplay("Ragdoll", null)]
[Limit(1F, 255F, 1F)]
[Unmanaged]
public byte PositionSolverIterations { get; set; }
Property Value
System.Byte
|
See Also
TotalMass
Calculates the total mass of all ragdoll bodies.
Declaration
[Unmanaged]
public float TotalMass { get; }
Property Value
System.Single
|
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
[EditorOrder(110)]
[EditorDisplay("Ragdoll", null)]
[Limit(1F, 255F, 1F)]
[Unmanaged]
public byte VelocitySolverIterations { get; set; }
Property Value
System.Byte
|
See Also
Methods
SetAngularVelocity(Vector3)
Sets the angular velocity of all rigidbodies in the ragdoll (in radians per second).
Declaration
[Unmanaged]
public void SetAngularVelocity(Vector3 value)
Parameters
Vector3
value
|
SetLinearVelocity(Vector3)
Sets the linear velocity of all rigidbodies in the ragdoll.
Declaration
[Unmanaged]
public void SetLinearVelocity(Vector3 value)
Parameters
Vector3
value
|