|
group2 0.1.0
CSE 125 Group 2
|
Position-Based-Dynamics ragdoll constraint system. More...
#include "ecs/registry/Registry.hpp"#include <cstdint>#include <entt/entt.hpp>#include <glm/gtc/quaternion.hpp>#include <glm/vec3.hpp>Go to the source code of this file.
Classes | |
| struct | physics::RagdollPbdJoint |
| One articulated joint in a PBD ragdoll skeleton. More... | |
Namespaces | |
| namespace | physics |
| Pure physics math — no ECS types, no registry. | |
Functions | |
| void | physics::enforceRagdollConnectivity (Registry ®istry, float dt, int iterations=8) |
| Enforce ragdoll connectivity + angular limits via N PBD iterations. | |
Position-Based-Dynamics ragdoll constraint system.
Replaces the velocity-bias (PGS+Baumgarte) joint solver for ragdoll bodies with a hard position-projection approach inspired by CS2 / Source 2 articulated ragdolls and the Müller PBD paper. The connectivity invariant — every parent-child anchor coincides in world space — is enforced directly by translating bodies, not by injecting corrective velocity into the next tick's solve. Bones therefore CANNOT detach under any forcing: gravity, contact impulses, knockback, etc. can only bend the joints (within angular limits) — never break them.
Per-tick order inside runDynamics:
Why this is more stable than the previous PGS joint pass: