Expand description
Human ragdoll builder from shared/human.c / shared/human.h.
Capsule bones + spherical/revolute joint tree used by the determinism scene and (later) joint sample demos.
SPDX-FileCopyrightText: 2026 Erin Catto SPDX-License-Identifier: MIT
Structs§
- Bone
- One bone of a human ragdoll. (Bone)
- Human
- Zero-initialized human ragdoll. Must call
super::create_humanto spawn. (Human)
Enums§
- BoneId
- Bone indices in the ragdoll hierarchy. (BoneId)
Constants§
- BONE_
COUNT - Number of bones in a human ragdoll. (bone_count)
- COLOR_
DODGER_ BLUE - COLOR_
LIGHT_ YELLOW - COLOR_
MEDIUM_ TURQUOISE - Hex colors used when
colorizeis true. (b3HexColor / types.h) - COLOR_
NAVAJO_ WHITE - COLOR_
PERU - COLOR_
TAN - FILTER_
JOINT_ COUNT - Max filter joints that disable selected bone-bone collisions. (FILTER_JOINT_COUNT)
Functions§
- create_
human - Spawn a capsule-bone ragdoll with spherical / revolute joint tree. (CreateHuman)
- destroy_
human - Destroy joints then bodies. Safe to skip when the world itself is destroyed. (DestroyHuman)
- human_
align_ spring - Attach a parallel spring from ground to the pelvis. (Human_AlignSpring)
- human_
apply_ random_ angular_ impulse - Apply a random angular impulse to spine_01. (Human_ApplyRandomAngularImpulse)
- human_
create_ motor_ anchors - Create kinematic motor anchors for every bone. (Human_CreateMotorAnchors)
- human_
create_ parallel_ anchors - Create kinematic parallel-joint anchors for every bone. (Human_CreateParallelAnchors)
- human_
set_ bullet - Toggle bullet CCD on every bone body. (Human_SetBullet)
- human_
set_ joint_ damping_ ratio - Set spring damping ratio on every bone joint. (Human_SetJointDampingRatio)
- human_
set_ joint_ friction_ torque - Scale max motor torque on every bone joint. (Human_SetJointFrictionTorque)
- human_
set_ joint_ spring_ hertz - Set spring hertz on every bone joint. (Human_SetJointSpringHertz)
- human_
set_ velocity - Set linear velocity on every bone body. (Human_SetVelocity)