Skip to content

API Class Ragdoll

github-actions[bot] edited this page Nov 24, 2026 · 3 revisions

Class: Ragdoll

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:68

Base class for everything attached to a node: built-in engine components and user GameBehaviors (ADR 0007, 0009). Instances are created by the engine (node.addBehavior(Type) or scene loading), never with new by game code.

Extends

Constructors

Constructor

new Ragdoll(): Ragdoll;

Returns

Ragdoll

Inherited from

Component.constructor

Properties

autoGetUp

autoGetUp: boolean = true;

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:107

Get up when mode goes from "ragdoll" to "off".


blend

blend: number = 1;

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:74

The simulated pose's weight over the animation, 0–1 (the graph's physicsBlend weight).


blendParameter

blendParameter: string = "ragdollBlend";

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:104

The graph's float parameter that physicsBlend reads as its weight.


bones

bones: RagdollBone[] = [];

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:83

Per-bone bodies; empty uses the skeleton's default ragdoll.


front

front: "+x" | "-x" | "+y" | "-y" | "+z" | "-z" = "+z";

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:89

The pelvis's local axis out of the belly.


getUpFromBack

getUpFromBack: string = "GetUpFromBack";

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:92

The graph's Base-machine state to get up from lying on the back.


getUpFromFront

getUpFromFront: string = "GetUpFromFront";

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:95

The graph's Base-machine state to get up from lying on the front.


mode

mode: RagdollMode = "off";

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:71

Off, limp, or muscles driving toward the animation.


pelvis

pelvis: string = "";

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:86

The bone whose facing picks the get-up state; empty: the first root body.


physicalPoseNode

physicalPoseNode: string = "physical";

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:98

The graph's physicalPose node (the get-up snapshot's source).


pinStrength

pinStrength: number = 1;

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:80

How strongly root bodies follow the animation in powered mode, 0–1.


snapshotNode

snapshotNode: string = "snapshot";

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:101

The graph's poseSnapshot node the get-up blends from.


strength

strength: number = 1;

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:77

Global muscle strength in powered mode (scales every drive).


teleportDistance

teleportDistance: number = 2;

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:110

A Skeleton node moving farther than this (m) in one fixed step is a teleport: the bodies reset to the animation.

Accessors

enabled

Get Signature

get enabled(): boolean;

Defined in: src/engine/core/Component.ts:57

Returns

boolean

Set Signature

set enabled(value): void;

Defined in: src/engine/core/Component.ts:61

Parameters
value

boolean

Returns

void

Inherited from

Component.enabled


gameObject

Get Signature

get gameObject(): GameObject;

Defined in: src/engine/core/Component.ts:37

Unity-style alias for node.

Returns

GameObject

Inherited from

Component.gameObject


isActiveAndEnabled

Get Signature

get isActiveAndEnabled(): boolean;

Defined in: src/engine/core/Component.ts:68

True when enabled, the node is active in the hierarchy, and the node is in a loaded world.

Returns

boolean

Inherited from

Component.isActiveAndEnabled


node

Get Signature

get node(): GameObject;

Defined in: src/engine/core/Component.ts:32

The node this component is on.

Returns

GameObject

Inherited from

Component.node


owner

Get Signature

get owner(): GameObject;

Defined in: src/engine/core/Component.ts:45

The node this component acts for: the node itself when attached directly, or the parent node when this component lives on a component node (ADR 0009).

Returns

GameObject

Inherited from

Component.owner


time

Get Signature

get time(): Readonly<TimeState>;

Defined in: src/engine/core/Component.ts:93

This component's World's clock (ADR 0032): the same values as Time, but safe to read outside the World's frame too (after an await, say).

Returns

Readonly<TimeState>

Inherited from

Component.time


transform

Get Signature

get transform(): Transform;

Defined in: src/engine/core/Component.ts:51

The Transform of the node this component is on, if it has one.

Returns

Transform

Inherited from

Component.transform


world

Get Signature

get world(): WorldHandle;

Defined in: src/engine/core/Component.ts:82

A handle on this component's World (ADR 0132): the same one Engine.findWorld returns. Load a scene into it, pause, connect or destroy it: this.world.loadScene("scenes/level2.scene.json"). Throws for a World no Engine owns.

Returns

WorldHandle

Inherited from

Component.world

Methods

body()

body(bone): GameObject | null;

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:122

The node holding bone bone's body while the ragdoll simulates (for forces and hit reactions), or null.

Parameters

bone

string

Returns

GameObject | null


getUp()

getUp(): Promise<AnimatorTravelResult>;

Defined in: src/plugins/ragdoll/runtime/Ragdoll.ts:117

Get up now: freeze the simulated pose into the graph's pose snapshot, travel to the get-up state the pelvis's facing picks, and turn the ragdoll off. Resolves when the state is entered (arrived), or unreachable when the ragdoll isn't simulating, its facing is unknown or the graph lacks the state.

Returns

Promise<AnimatorTravelResult>


instantiate()

instantiate(prefabPath, options?): GameObject;

Defined in: src/engine/core/Component.ts:103

Instantiate a prefab in this component's World (ADR 0034), like GameObject.instantiate. Use it in code that may run after an await: by then the frame is over and the current World is the Engine's default one, which may not be this component's. A parent from another World throws.

Parameters

prefabPath

string

options?

InstantiateOptions = {}

Returns

GameObject

Inherited from

Component.instantiate

Clone this wiki locally