Skip to main content

Module human

Module human 

Source
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_human to 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 colorize is 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)