class

RagdollBuilder

Module
Physics
Header
#include "Physics/RagdollBuilder.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
std::vector<Mat4>BuildPartPosesPart-indexed world joint matrices for Ragdoll::SetPose.
boolQueryAssetCollisionWhat the group filter of a ragdoll built from asset answers for every pair of its bodies, keyed by bone name — the question the broad phase asks it.
FPhysicsBodyDefAutoFitBodyEditor authoring helpers.
FPhysicsAssetGenerateAsset

Function details

BuildPartPoses

C++
static std::vector<Mat4> BuildPartPoses(const std::vector<RagdollBodyMapping>& mappings, size_t partCount, const Mat4& modelToWorld, const std::vector<Mat4>& globalModel)

Part-indexed world joint matrices for Ragdoll::SetPose. SetPose walks the ragdoll's PART array and adds its root offset to every joint translation, so callers must pass these with a zero root offset. Feeding it bone-indexed matrices scrambles any asset-built ragdoll whose part order differs from bone order. Parts without a usable mapping fall back to modelToWorld so they at least land on the entity, not the origin.

QueryAssetCollision

C++
static bool QueryAssetCollision(const FPhysicsAsset& asset, const Skeleton& skeleton, std::unordered_map<std::string, std::unordered_map<std::string, bool>>& outCanCollide)

What the group filter of a ragdoll built from asset answers for every pair of its bodies, keyed by bone name — the question the broad phase asks it. The empty name stands for an ordinary world body. False when the asset builds no ragdoll on this skeleton.

AutoFitBody

C++
static FPhysicsBodyDef AutoFitBody(const Skeleton& skeleton, int32_t boneIndex)

Editor authoring helpers. AutoFitBody fits a capsule to the bone's length toward its first child (falling back to a small sphere for terminal bones); GenerateAsset runs it for every eligible bone and wires the parent-child constraints — the "auto-rig" the editor offers on an empty asset.

GenerateAsset

C++
static FPhysicsAsset GenerateAsset(const Skeleton& skeleton)
Generated from Physics/RagdollBuilder.h via physics.json · Nov 4, 2026Version 1.0.0