Goal: rebuild this WIP Unreal Engine 5 prototype into a designer-friendly plugin.
This technical sandbox focuses on realistic bullet impacts and procedural hit reactions for AI. Instead of canned “hit” animations, enemies respond using a blend of skeletal physics, procedural animation, and data-driven gameplay.
How it works
Bullets are traced from the player camera for precise, true-to-aim impacts.
Each hit evaluates body part, weapon type, and distance.
Damage, knockback, and reaction intensity come from easy-to-edit data tables and curves.
Reactions
Hits trigger a partial ragdoll state that wobbles, twists, and recovers using physics and curves.
When health reaches zero, enemies smoothly transition into a full ragdoll using the same system.
This isn’t a full game - it’s a technical showcase of physics-driven, procedural feedback for gunplay and AI reactions.
Procedural Animation plugin
Physics-Driven Bullet Impact & Procedural Animations System
About
-
Physics-Ready Enemy Template
I created a reusable character template that wraps Unreal’s Physics Control around a standard skeletal character:
On spawn, it:
Aligns the skeletal mesh under the capsule.
Generates physics control sets (world-space and parent-space) and body modifier sets (all bodies, feet, etc.).
Configures which bones belong to which limb groups via structured data.
Once this template is in place, any new enemy type only needs to inherit from it to gain:
Physics-aware bones,
Support for partial ragdoll,
Support for full ragdoll and hit reactions.
This makes the system drop-in friendly: setup for a new enemy is mostly a matter of assigning meshes and data, not writing new code.
-
Data Tables for Damage & Behaviour
All damage values are stored in a data table, not hard-coded:
Each row defines:
Weapon ID (rifle, shotgun, melee, etc.).
Target bone / body region (head, torso, arm, leg).
Damage values for different distance bands (close, medium, long).
At runtime, when a bullet hits:
The system calculates distance from camera to impact.
It looks up the row matching the weapon and hit bone.
It selects the appropriate damage for that distance band.
If no specific entry exists, it falls back to the weapon’s default damage.
This approach makes balancing incredibly easy:
Designers can tweak damage, range falloff, and per-bone lethality directly in the data table.
No code changes, no recompiles—just update the table and play.
Editable Weapon Impulse / Reaction Strength
Weapons also expose data-driven parameters for physical impact, such as impulse strength:
Each weapon defines:
Its base damage,
Its physical impulse magnitude,
Other tuning values (e.g. how “forceful” hits should feel).
The hit reaction system reads these values dynamically, so:
Swapping a rifle for a shotgun can instantly change how hard enemies get knocked back.
You can prototype different weapon “feel” (heavy, punchy, weak, snappy) just by editing data, not code.
This makes the whole system very content-creator friendly: weapons and reactions are tuned from data assets
-
Interface-Driven Hit Reactions
After the engine’s damage system runs, the weapon calls a generic hit reaction interface on the enemy with:
Who fired the shot,
World-space hit location,
The name of the bone that was hit.
The enemy’s reaction logic then:
Stores the impacted bone.
Reads the weapon’s configured impulse strength.
Sets up a short timeline to control how strong the physics drives are over time.
Switches into a “hit reaction” physics profile (partial ragdoll).
After a brief delay, applies the actual physical impulse to the hit bone.
Because this is interface-based, any character that implements the interface and uses the physics template can plug into the same procedural animation system with minimal setup.
-
Partial Ragdoll (Alive, Flinch State)
For non-lethal hits:
Joint constraints are switched to a looser profile.
Gravity can be reduced or temporarily disabled on most bodies.
Feet are kept kinematic to prevent full collapse.
World-space controls are enabled so the body roughly stays upright, but with softer constraints.
This creates procedural animations where:
The upper body wobbles,
Limbs swing in response to impact,
The character recovers back into their normal pose.
Full Ragdoll (Death)
When health reaches zero:
The enemy is marked as dead and stops standard hit handling.
Constraints are relaxed further, and gravity is restored to full.
The movement capsule is removed/disabled so the skeletal mesh fully simulates.
Physics controls are configured for a pure ragdoll state.
The character transitions smoothly from animation to partial physics to full ragdoll, using the same underlying system.
Timelines & Curves for “Floppy to Stable” Behaviour
A timeline driven by a curve asset controls how strong the physics drives are during a reaction:
Immediately after impact, the curve can reduce drive strength:
The body becomes looser and more influenced by the impulse.
Over time, the curve raises drive strength again:
The body is pulled back toward its animated pose and stabilizes.
Because these curves live in assets:
Designers can quickly adjust whether hits feel snappy, heavy, or slow-motion.
The behaviour of the procedural animations is fully tunable in the editor without changing code.
-
Once physics multipliers are in place:
The system takes the player camera’s forward vector.
Scales it by the weapon’s impulse strength.
Applies that force directly to the rigid body of the bone that was hit.
With the constraints and multipliers configured, this yields:
Headshots that snap the head in the direction of fire,
Torso hits that twist and bend the spine,
Limb hits that produce subtle swings and secondary motion.
All of this motion is emergent—from physics and control settings—rather than pre-authored animation clips.
Gameplay Systems
Project Information
Role: Programmer
Team Size: 1
Time Frame: 4 Weeks
Engine: Unreal Engine 5.4.4
Language: C++