Skip to main content

ragdoll

physics · 2 properties · Physics

Drives a rig's bones from the bodies physics2d.ragdoll or physics3d.ragdoll built for it. blend is how much of the simulated pose the bones take: 0 leaves the clip in charge while the bodies simulate unseen, 1 goes limp, and anything between lets a hit push an animation around without ending it.

In a scene, ragdoll is the node key that applies it. A script reaches the same properties through node.ragdoll.get() and node.ragdoll.set(table).

Properties

propertytypedefaultdescription
blendfloat1How much of the simulated pose the bones take Range 0–1.
bodiesnodeThe node holding the bodies, one per bone, named after it

Script functions

Methods of node.ragdoll, the handle a node carrying this component exposes. Each is also a free function on its module, taking the node as its first argument. Every handle also has get(), set(table), has() and remove().

From physics:

methodwhat it does
ragdoll_blend(float)How much of the ragdoll's simulated pose the rig's bones take, 0 to 1: 0 leaves the clip in charge while the bodies simulate unseen, 1 goes limp. Tween it to fall over and get back up.