Hitboxes and hurtboxes explained: how collision works in action games
When a sword clearly passes through an enemy but doesn't register, players blame the hitbox. Understanding how these shapes work helps you build combat that feels fair.
The basics
- Hitbox: the area that deals damage, like a sword swing or punch.
- Hurtbox: the area that can receive damage, usually roughly matching the character's body.
- Collision box / pushbox: stops characters from overlapping, separate from damage.
When a hitbox overlaps an opponent's hurtbox during an attack's active frames, a hit registers.
Simple shapes, not exact meshes Games use boxes, spheres and capsules because checking overlaps is cheap. Precise mesh collision is rarely worth the cost.
Frame-based timing Attacks are often divided into:
- Startup: before the hitbox appears
- Active: the hitbox exists
- Recovery: the attacker is vulnerable
Tips for fair feeling combat
- Make player hurtboxes slightly smaller and attack hitboxes slightly generous.
- Visualise boxes in a debug mode while tuning.
- Fast-moving attacks can skip through targets between frames, so use sweeps or continuous checks.
- Prevent a single attack from hitting the same target repeatedly unless intended.
Fighting games have made hitbox viewers famous, letting players study exact frames.
How do you debug combat collisions in your projects? What game has hitboxes that feel noticeably unfair?
Comments · 3
Generous hurtboxes feel fair to players, even if they look off. Some games cheat in your favour deliberately because it feels better.
Frame data matters too. Hitboxes only exist during active frames, so a move can look like it's connecting and still do nothing.
Can I turn on hitbox display in a game I'm modding? I'd like to see how they're set up.