Body Physics¶
The Body Is Physics¶
Every character in the game — player, NPC, boss — is a physics simulation. Not a mesh driven by animations. Not a ragdoll that activates on death. A body that obeys physics every frame, the same way the sword obeys physics, the same way the arrow obeys physics, the same way everything in the engine obeys physics.
Humans have to obey physics. A body should obey physics. If anything looks weird, the physics is wrong. Fix the physics, not the animation. There is no animation.
The Skeleton¶
A human skeleton for combat purposes is ~20 rigid segments connected by constrained joints:
Head
│
Neck
│
┌──── Spine Upper ────┐
│ │ │
Shoulder L │ Shoulder R
│ Spine Lower │
Upper Arm L │ Upper Arm R
│ │ │
Lower Arm L │ Lower Arm R
│ ┌──┴──┐ │
Hand L │ │ Hand R
Hip L Hip R
│ │
Thigh L Thigh R
│ │
Shin L Shin R
│ │
Foot L Foot R
Each segment is a rigid body with mass, moment of inertia, and a collision shape. Each connection is a joint with per-axis rotation limits. The physics engine handles rigid body simulation and joint constraints. The skeleton is a constrained multi-body system — entities, components, queries, and systems. The same ECS. The same weaver. The same WorkerPool. The same SoA transpose.
Mass Distribution¶
A real human body has specific mass ratios that determine how the body moves:
| Segment | % Body Mass | Purpose in Combat |
|---|---|---|
| Head | 8% | Vulnerable target. Gaze direction drives awareness. |
| Torso (upper + lower) | 40% | Center of mass anchor. Rotation generates swing force. |
| Upper Arm | 3% each | Force transmission chain to weapon. |
| Lower Arm | 2% each | Final lever before weapon. |
| Hand | 0.6% each | Weapon attachment. Grip force determines weapon control. |
| Thigh | 10% each | Primary movement driver. |
| Shin | 5% each | Ground contact lever. |
| Foot | 1.5% each | Ground interface. Balance point. |
Scale these by character build. An angel with lighter build has different mass distribution than a demon with heavier build. The physics produces the racial combat differences — not animation sets, not stat modifiers. A heavier torso rotates slower. Longer limbs have more moment of inertia. The body IS the stats.
Joint Constraints¶
Each joint has per-axis rotation limits:
- MinAngle / MaxAngle — the physical range of motion
- Stiffness — resistance to rotation (Nm/rad). Produces natural posture without animation. A joint at rest returns toward its rest angle.
- Damping — energy absorption rate. Prevents oscillation. Makes movement look controlled rather than springy.
- RestAngle — preferred resting angle. All joints at rest angles with minimal gravity correction IS the idle pose. No idle animation needed.
A character standing idle has every joint at its rest angle with muscles applying minimal corrective torques against gravity. That IS the idle pose. The body stands because the physics holds it up — the same way a real body stands.
The Muscle Model¶
Muscles are force generators that span joints. They are the only way the character moves.
- MaxForce — maximum torque this muscle can produce (Nm). THIS IS STRENGTH. Not a stat. A physics parameter.
- ActivationSpeed — how quickly the muscle reaches full activation (1/s). THIS IS SPEED.
- FatigueRate — how quickly sustained effort reduces MaxForce. THIS IS STAMINA. Not a bar. A muscle property.
- RecoveryRate — how quickly resting restores MaxForce.
Fatigue replaces stamina. No stamina meter. No resource bar. The character's muscles fatigue based on how much force they've produced over time. The player feels the fatigue through the physics — swings slow down, redirects take longer, guards weaken. The player learns to manage effort the way a real fighter does — by not overcommitting, by using efficient technique, by resting between exchanges.
Character strength is not a stat. It is the MaxForce of the muscles. A stronger character's muscles produce more torque. A fatigued character's muscles produce less. A character who has been fighting for minutes has accumulated fatigue across all muscles — their swings are slower, their guard is weaker, their recovery is longer. Not because of a stamina bar. Because the muscles are tired.
Motor Control¶
The player's input doesn't directly move the body. The player's input sets intent. The motor control system translates intent into muscle activations that produce the intended movement through physics.
Intent is high-level: "move forward," "swing from the right," "block high," "slip left." The motor control system knows which muscles to activate and in what sequence to produce that movement.
For the player character, the motor control system is well-tuned — the tribrid body functions naturally. The skill expression is in the player's choice of intent (which attack, when, from where), not in the execution fidelity.
For AI characters, motor control tuning represents combat skill: - A skilled angel's motor control produces crisp, minimal-effort movements - An unskilled demon's motor control wastes energy on excessive force - The visual difference is the physics — efficient vs. inefficient force application looks different because it IS different
Balance and Stability¶
A character stays upright when their center of mass projects down within their base of support (the polygon formed by their feet on the ground). When the center of mass projects outside the base, the character falls — unless they step to widen the base or apply corrective torques.
The balance controller runs every physics tick:
- Computes the body's center of mass from all segment positions and masses
- Projects it down to the ground plane
- Compares the projection to the base of support
- Applies corrective muscle activations to maintain balance
This is what makes staggers, knockbacks, and the bind physically real:
- Stagger: An impact force displaces the center of mass outside the support base. The balance controller activates corrective muscles. The character stumbles — takes a step to widen the base. The stagger duration is how long it takes the balance controller to bring the center of mass back over the feet.
- Knockback: A larger impact force displaces the center of mass further. The character takes multiple steps. The feet scramble to catch up with the shifting center of mass.
- The bind: Both characters push against each other through their weapons. The forces propagate through the arms to the torso to the feet. The balance controller keeps both characters upright against the opposing forces. A stronger push shifts the opponent's center of mass — their balance controller compensates — their feet adjust.
Ground Contact¶
Feet are the interface between the character and the world. Foot segments have friction with the ground surface. Different surfaces have different friction coefficients — stone, mud, ice, wood.
Footwork emerges from ground contact. A sidestep is: the balance controller detects lateral intent. The motor control activates leg muscles. The foot pushes off the ground (Newton's third law — the ground pushes back). The body accelerates laterally. The other foot plants. The body decelerates. The sidestep distance is determined by muscle force and ground friction.
On ice, the friction is low. The push-off force exceeds friction. The foot slips. The sidestep doesn't work as intended. The character slides. The player feels the surface through the physics — not through a "slippery surface" debuff.
Integration with Combat Systems¶
Footwork: Moving forward means the leg muscles are driving the body forward. Attacking during forward movement means the arm muscles are swinging the weapon while the legs continue driving. The weapon's kinetic energy includes the body's forward momentum — a thrust from a sprint hits harder because the body's mass was moving forward.
Momentum: The commitment curve is weaponMomentum > redirectThreshold × characterStrength. In body physics, characterStrength is the shoulder and torso muscles' MaxForce. weaponMomentum is the actual angular momentum of the weapon rigid body. The redirect threshold is whether the muscles can produce enough counter-torque to decelerate and re-accelerate the weapon.
Melee: The parry is arm muscles driving the weapon into the incoming weapon's path. The collision force transfers through the arm joints to the shoulder to the torso to the feet. A heavy impact stresses the arm joints — if the force exceeds what the arm muscles can stabilize, the guard collapses.
Racial differences: Angels are lighter, with longer limbs and faster muscle activation. Demons are heavier, with denser mass distribution and higher muscle MaxForce. Humans are balanced. Hybrids are mixed. The combat differences emerge from the physics of different bodies.
The Budget¶
20 segments × 3 joint axes = 60 constraint evaluations per character per physics tick. Muscle activations are ~40 multiply-adds per character. The balance controller is a weighted average of 20 positions plus a PID correction. All of this vectorizes through the weaver.
100 characters × 20 bones = 2,000 entities. At 0.15ns/entity for integration: 300 nanoseconds. Add constraint solving and muscle forces at 10x overhead: 3 microseconds. At 144Hz substeps: 432 microseconds per frame.
Less than half a millisecond for 100 fully physics-simulated characters. The engine was built for this.
No Animation¶
There is no animation system. There are no authored clips. There are no blend trees. There are no state machines. There is a body obeying physics.
- "Idle animation" is the body standing under gravity with joints at rest angles
- "Attack animation" is muscles driving the weapon through an arc
- "Stagger animation" is the balance controller recovering from a force displacement
- "Recovery animation" is the weapon's momentum decelerating past the strike point while the body rebalances
- "Death animation" is the body going limp — muscles deactivate, joints go to zero stiffness, gravity takes over
Every fight is unique because every physics state is unique. Near-misses are real because the bodies are where the physics says they are. Staggers are real because the forces are real. The bind is real because both bodies are under real opposing forces.
If something looks wrong, the physics is wrong. Fix the joint limits. Fix the muscle force curves. Fix the balance controller gains. Tune the physics until a human body obeying physics looks like a human body. Because it is one.