> For the complete documentation index, see [llms.txt](https://ironsami-studio.gitbook.io/proceduralhitreactions/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ironsami-studio.gitbook.io/proceduralhitreactions/modules/reaction-profiles.md).

# Reaction Profiles

## ReactionProfile(Updated 1.1)

A **Reaction Profile** is a **ScriptableObject** asset that defines how a hit should look and feel. By separating reaction data into profiles, you can easily reuse setups like **Light Hit**, **Heavy Hit**, or **Explosion** across multiple characters or objects.

> **Where is it?** **Create ▸ HitReactions ▸ ReactionProfile** in the Project window, then select the asset to open this inspector.

***

### Inspector Reference

In **version 1.1**, all main reaction settings have been centralized into the **Reaction Profile**, allowing for maximum reusability and cleaner setups.\
The **BodyPartReactor** now only references the **Reaction Profile**, along with **Bone Reference**, **Follow Objects**, and the new **Per-Bone Multiplier**, which allows fine-tuning intensity and duration per bone.

***

### Where is it?

Create your profile via:\
`Create ▸ HitReactions ▸ ReactionProfile`

Select the asset to open its inspector and configure your settings.

***

### Inspector Reference (Updated 1.1)

| **Category**        | **Property**                     | **Description**                                                                                                                                               |
| ------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Timing**          | `reactionDuration`               | Total duration of the hit reaction (in seconds).                                                                                                              |
|                     | `blendInSpeed`                   | Speed for blending in (0→1 weight).                                                                                                                           |
|                     | `blendOutSpeed`                  | Speed for blending out (weight→0).                                                                                                                            |
| **Blend Curve**     | `blendCurve`                     | Controls the weight curve over time.                                                                                                                          |
| **Rotation**        | `useRotation`                    | Enables rotation reactions.                                                                                                                                   |
|                     | `rotationStrength`               | Max random rotation per axis.                                                                                                                                 |
|                     | `rotationMode`                   | RandomOnly, DirectionOnly, or RandomAndDirection.                                                                                                             |
|                     | `directionRotationMultiplier`    | Mix factor between random and direction-based rotation (0 = random only, 1 = direction only).                                                                 |
| **Translation**     | `useTranslation`                 | Enables translation (position) reactions.                                                                                                                     |
|                     | `translationStrength`            | Max random translation per axis.                                                                                                                              |
|                     | `translationMode`                | RandomOnly, DirectionOnly, or RandomAndDirection.                                                                                                             |
|                     | `directionTranslationMultiplier` | Units moved along hit direction.                                                                                                                              |
| **Hit Behaviour**   | `useContactPointDirection`       | Uses contact point vector for hit direction.                                                                                                                  |
|                     | `useLocalHitDirection`           | Convert incoming vector into bone local space for more intuitive direction locking. Disable if you want world‑space comparison (rare).                        |
|                     | `autoInvertBackHits`             | If forward local Z is negative, flip hit direction so reactions always push *backwards*. Handy when character faces away from camera in 2D sidescrollers etc. |
| **Blend Behaviour** | `additive`                       | Add offsets *on top* of the animation pose. Disable to fully replace animation (useful on props without an Animator).                                         |
|                     | `blendResetMode`                 | HardReset or ScaledCarryOver modes for blending.                                                                                                              |
|                     | `carryOverScale`                 | How much weight to preserve when using ScaledCarryOver.                                                                                                       |
|                     | `slowBlendFactor`                | Multiplies *Blend‑In Speed* by **Slow Blend Multiplier**—simulate sluggish reactions on heavy impacts. (0 = off)                                              |
|                     | `offsetsFromCurrentPose`         | Calculate offsets relative to **current** pose instead of bind pose—prevents drift when base animation is already rotated (e.g., leaning).                    |
| **Hit Acceptance**  | `hitAcceptance`                  | **Off (default):** ignore new hits while weight > 0 (prevents jitter on rapid fire). **On:** every hit resets timer even if still reacting.                   |
| **Axis Locks**      | `rotationAxisMask`               | Per-axis lock for rotation (1 = allowed, 0 = blocked).                                                                                                        |
|                     | `translationAxisMask`            | Per-axis lock for translation (1 = allowed, 0 = blocked).                                                                                                     |

### Practical Tips

* **Heavy impacts:** Increase *Reaction Duration* to \~0.7 s and lower *Blend‑In Speed* slightly for a sluggish recoil.
* **Subtle upper‑body hits:** Disable *Translation*, keep *Rotation Strength* around `(5,5,2)`.
* **Explosions:** Set *Rotation Mode* = DirectionOnly, *Direction Rotation Multiplier* = 2, and enable *Translation* with a 0.5 m push.
* **Networked games:** Store profile GUIDs and sync only the hit parameters to other clients—every rig will reproduce the same offsets deterministically.

***

### Creating Variants

Right‑click an existing profile → **Duplicate** to branch a new variant. You can then swap profiles at runtime or per weapon via code:

```csharp
reactor.profile = heavyHitProfile; // on shotgun pellets
```

***

#### Next Up

Head to **BodyPartReactor Inspector** to see how profiles plug into each bone and which runtime toggles affect blending.
