FUNBRUN
Devlog/FUNBRUN/Code

Building PrimalCore: our custom physics engine

March 20, 20261 min readCode

When we started FUNBRUN, we quickly realized that no off-the-shelf physics engine could deliver the kind of visceral, body-level combat we envisioned. Unity's built-in physics is great for general purposes, but fighting games demand a different level of precision and responsiveness.

That's how PrimalCore was born — our custom physics layer that sits on top of Unity's Rigidbody system but adds active ragdoll control, predictive collision, and hit reaction curves.

The key insight was treating each limb as an independent agent with its own physics priorities. When a punch connects, the impact propagates through the skeleton using a weighted impulse chain — heavier body parts absorb more force, lighter ones whip around.

We spent three months tuning the "weight feel" — that sensation when a heavy character lands a hook versus a light character throwing a jab. It's all in the impulse curves and recovery frames.

PrimalCore v2 (shipped in 0.4.0) introduced predictive collision, which pre-calculates hit trajectories one frame ahead. This eliminated the "ghost hits" problem that plagued early builds.

Next up: we're working on surface-dependent reactions. Hitting someone on concrete should look different from hitting them on grass. Stay tuned.

F
Project
FUNBRUN
View project →
← Previous
TerraForge 2 v2.0.3 — patch notes and what's next
TerraForge 2
Next →