unity-combatlisted
Install: claude install-skill tipoLi5890/unity-dev-skills
# unity-combat — one swing is one damage event, and the engine will not enforce it for you
> **`OnTriggerEnter` counts collider pairs, not attacks.** A sword that crosses a sentry with a
> head and a torso hurtbox raises it twice; a target that steps out and back in raises it again;
> `OnTriggerStay` raises it every step. Nothing in PhysX or Box2D knows what a swing is. So the
> trigger is demoted to a question — what is in this volume now — and the **attack** keeps the
> list of who it has already hit.
## Symptom → where to look (first match wins; stop at the first cause you confirm)
| Symptom | Go to |
|---|---|
| "add health and damage" — setting up the path | §0 |
| "the enemy takes damage twice from one swing": one swing takes two hearts, or the count rises with the number of colliders | §1 |
| "the sword hits every frame": health lost on every step the weapon touches | §1 |
| "my attack does not hit the enemy": the swing passes through and nothing is reported | §2 |
| It lands on the attacker, on a teammate, or through a wall | §2 |
| The window stays open after the attack was interrupted | §3 |
| "spikes drain all my health": every heart lost at once on a hazard, or is hit again while flying back | §4 |
| "the shot goes straight through the sentry": a fast shot passes through the sentry or a thin wall | §5 |
| "knockback pushes it into the wall": the target ends inside a wall, or it does not move at all | §6 |
| Hits land and nothing shows: no flash, no pause, no so