Enfusion Script API
|
Wrapper over Ragdoll simulation. More...
Public Member Functions | |
proto external void | SetActive (int act) |
Changes activation state of the ragdoll simulation. | |
proto external void | Destroy () |
Destroys ragdoll simulation. | |
proto external bool | Enable () |
Enables ragdoll simulation. | |
proto external bool | Disable (bool resetSkeleton) |
Disables ragdoll simulation. | |
proto external Physics | GetBoneRigidBodyByNodeIndex (int nodeIndex) |
Returns rigidbody of a specified bone. | |
proto external Physics | GetBoneRigidBody (int index) |
Returns rigidbody of a specified bone. | |
proto external int | GetNumBones () |
Returns number of bones in ragdoll. | |
Public Member Functions inherited from pointer | |
proto string | ToString () |
Static Public Member Functions | |
static proto PhysicsRagdoll | CreateRagdoll (notnull IEntity owner, string ragdollDefName, float mass, int layerMask) |
Creates ragdoll from definition provided. | |
static proto PhysicsRagdoll | GetRagdoll (notnull IEntity owner) |
Returns ragdoll on provided entity if available. | |
Wrapper over Ragdoll simulation.
|
static |
Creates ragdoll from definition provided.
This replaces current physics simulation.
owner | Entity that will be associated with ragdoll |
ragdollDefName | Ragdoll resource name |
mass | Ragdoll mass |
layerMask | Bit mask of layers |
proto external void PhysicsRagdoll.Destroy | ( | ) |
Destroys ragdoll simulation.
Only if it is the current physics simulation.
Disables ragdoll simulation.
resetSkeleton | True to update entity transforms |
proto external bool PhysicsRagdoll.Enable | ( | ) |
Enables ragdoll simulation.
This replaces current physics simulation.
Returns rigidbody of a specified bone.
index | Index of a bone. Must be within bounds (GetNumBones) |
Returns rigidbody of a specified bone.
nodeIndex | Index of a bone in skeleton |
proto external int PhysicsRagdoll.GetNumBones | ( | ) |
Returns number of bones in ragdoll.
|
static |
Returns ragdoll on provided entity if available.
owner | Entity checked for ragdoll |
proto external void PhysicsRagdoll.SetActive | ( | int | act | ) |
Changes activation state of the ragdoll simulation.
act | New activation state |