Enfusion Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
PhysicsRagdoll Interface Reference

Wrapper over Ragdoll simulation. More...

Inheritance diagram for PhysicsRagdoll:
[legend]

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.
 

Detailed Description

Wrapper over Ragdoll simulation.

Member Function Documentation

◆ CreateRagdoll()

static proto PhysicsRagdoll PhysicsRagdoll.CreateRagdoll ( notnull IEntity  owner,
string  ragdollDefName,
float  mass,
int  layerMask 
)
static

Creates ragdoll from definition provided.

This replaces current physics simulation.

IEntity rdEntity = GetWorld().FindEntityByName("rd_test");
string rdName = "{CE761502CE2E1990}Prefabs/Characters/character.ragdoll";
int rdLayer = 1 << 10;
PhysicsRagdoll rd = PhysicsRagdoll.CreateRagdoll(rdEntity, rdName, 1, rdLayer);
Definition: IEntity.c:13
Wrapper over Ragdoll simulation.
Definition: PhysicsRagdoll.c:16
static proto PhysicsRagdoll CreateRagdoll(notnull IEntity owner, string ragdollDefName, float mass, int layerMask)
Creates ragdoll from definition provided.
Parameters
ownerEntity that will be associated with ragdoll
ragdollDefNameRagdoll resource name
massRagdoll mass
layerMaskBit mask of layers

◆ Destroy()

proto external void PhysicsRagdoll.Destroy ( )

Destroys ragdoll simulation.

Only if it is the current physics simulation.

◆ Disable()

proto external bool PhysicsRagdoll.Disable ( bool  resetSkeleton)

Disables ragdoll simulation.

Parameters
resetSkeletonTrue to update entity transforms

◆ Enable()

proto external bool PhysicsRagdoll.Enable ( )

Enables ragdoll simulation.

This replaces current physics simulation.

◆ GetBoneRigidBody()

proto external Physics PhysicsRagdoll.GetBoneRigidBody ( int  index)

Returns rigidbody of a specified bone.

Parameters
indexIndex of a bone. Must be within bounds (GetNumBones)

◆ GetBoneRigidBodyByNodeIndex()

proto external Physics PhysicsRagdoll.GetBoneRigidBodyByNodeIndex ( int  nodeIndex)

Returns rigidbody of a specified bone.

Parameters
nodeIndexIndex of a bone in skeleton

◆ GetNumBones()

proto external int PhysicsRagdoll.GetNumBones ( )

Returns number of bones in ragdoll.

◆ GetRagdoll()

static proto PhysicsRagdoll PhysicsRagdoll.GetRagdoll ( notnull IEntity  owner)
static

Returns ragdoll on provided entity if available.

Parameters
ownerEntity checked for ragdoll

◆ SetActive()

proto external void PhysicsRagdoll.SetActive ( int  act)

Changes activation state of the ragdoll simulation.

Parameters
actNew activation state

The documentation for this interface was generated from the following file: