Core Concepts
Core Concepts
Understand the four building blocks that power every reaction in the system.
[Projectile / Blade]
│ OnCollisionEnter()
▼
HitReactionTrigger ─► HitReactionController ─► BodyPartReactor ─► ReactionProfile
Each block has a single responsibility, making the system easy to extend and reason about. Skim the summaries below, then jump into the dedicated pages for full inspector field breakdowns.
1. HitReactionController
Role: Per‑character hub that receives incoming hits and forwards them to the right bone.
Lives on the root GameObject that also holds the
Animator
.Maintains a list of BodyPartReactors to loop through on
React()
calls.Exposes a single public API:
void React(string partName, Vector3 hitDirection, Vector3 hitPoint);
Drives the weight of a dedicated Animator Layer so pose offsets stay additive.
⮞ Tip: You can use the exposed api script React() to trigger reaction in your own scripts, or add the HitReactionTrigger module to your projectile.
2. BodyPartReactor
Role: Applies translation & rotation offsets to one specific bone according to a ReactionProfile.
Added to each bone that should respond (Chest, Head, arms…).
Computes direction‑aware and/or random offsets every hit.
Handles blend‑in / blend‑out, axis locks, carry‑over, slow‑blend, and follow‑through chains. >DEPRECATED in 1.1 and moved to ReactionProfile
Runs heavy math in
LateUpdate()
to avoid fighting the Animator.
⮞ Deep‑dive: Head to the BodyPartReactor page for detailed inspector reference and best‑practice tips.
Procedural Hit Reactions 1.1 – Important Changes
In version 1.1, the values previously found within the BodyPartReactor have been moved to the new Reaction Profiles system. The BodyPartReactor now only contains:
Bone Reference
Reaction Profile
Follow Objects
Per-Bone Multiplier (new), which allows you to adjust the intensity and duration of the reaction per bone.
These changes are part of the updated and more flexible profiles/body part reactor system, designed to give you greater control and customization.
3. ReactionProfile
Role: ScriptableObject that stores timing, strength, and axis rules—re‑usable across characters.
Timing: duration, blend‑in, blend‑out speeds, custom curve.
Rotation / Translation: enable toggles, strength vectors, random vs. directional modes.
Hit‑direction source: choose between bullet vector or contact‑point direction.
Axis masks: per‑axis on/off switches for both rotation and translation.
⮞ Deep‑dive: The ReactionProfile page documents every parameter with practical examples.
Since 1.1 more options have been moved to the ReactionProfiles module from the BodyPartReactor module. See the image below

4. HitReactionTrigger
Role: Drop‑in helper component that auto‑detects collisions and calls React()
with the correct data.
Works on projectiles, melee blades, fists, explosions—anything with a
Collider
.Filters collisions via a React Layers mask so terrain and walls won’t trigger hits.
Determines hit direction by falling back gracefully:
Rigidbody velocity
Transform movement delta
Collision normal
Can auto‑destroy the projectile after impact, with an optional delay for particle effects.
⮞ Deep‑dive: Check the HitReactionTrigger page for setup checklists and extension hooks.
How They Talk to Each Other
A HitReactionTrigger registers
OnCollisionEnter
and figures out what it hit and from which direction.It finds the BodyPartReactor sitting on that bone (via
collision.transform
).It climbs the hierarchy to grab the owning HitReactionController.
The controller’s React() loops through its reactor list and triggers the matching bone.
The BodyPartReactor pulls values from its assigned ReactionProfile, blends offsets, and writes transforms in
LateUpdate()
.
This separation keeps data generic (profiles), math local (reactor), plumbing simple (controller), and input flexible (trigger).
Last updated