---
title: "Hitbox vs hurtbox: the three boxes every character needs"
description: "A hitbox is where an attack deals damage and a hurtbox is where a character takes it. See the three boxes, why none should match the sprite, and play it."
date: 2026-11-18
url: https://valdemird.com/blog/hitbox-vs-hurtbox/
lang: en
tags: ["game-feel", "game-design", "godot", "combat"]
---

**Playable sheet: Hitbox, hurtbox and body** (the real game, in the page)

- Video: https://valdemird.com/videos/play/platformer-lab/combate-c_boxes.mp4 (Attacks the training dummies from the edge of reach. With the generous hitbox the slash lands; after T the same slashes from the same spot miss.)
- Play: https://valdemird.com/play/platformer-lab/index.html?plano=combate&lamina=c_boxes&lang=en

How to try it:
1. Walk right with → and slash the first training dummy with C. Green is where you can be hit, red is your slash while it's active, white is your body.
2. Step back with ← until the slash barely reaches and attack again. The red box goes past the drawn slash, and it still lands.
3. At the dummy on the pedestal, attack from the floor without jumping. The generous box is tall enough to reach it.
4. Press T for the exact box and repeat both. From the same spots, the slash misses.

# Hitbox vs hurtbox: the three boxes every character needs

> A hitbox is where an attack deals damage and a hurtbox is where a character takes it. See the three boxes, why none should match the sprite, and play it.

A **hitbox** is where an attack deals damage. A **hurtbox** is where a character can take it. A hit is one overlapping the other, and a third box, the body, only bumps into floors and walls.

| Box | Size | Against the drawing |
|---|---|---|
| Player body | 24×36 px | it's the collision shape |
| Player hurtbox | 16×28 px | smaller: a graze doesn't count |
| Player slash hitbox | 88×56 px | bigger: the exact one is 48×28 |
| Enemy hurtbox | body + 6 px | bigger: easy to hit |
| Enemy contact hitbox | 60% of the body | smaller: brushing past is free |

Hitbox, hurtbox and body: three boxes, three jobs

[Infil's Fighting Game Glossary](https://glossary.infil.net/?t=Hitbox) defines a hit the same way, and gives the color convention most training modes use: hitboxes red, hurtboxes green. Fighting games call the third box the pushbox. Here the body is what collides with the world, and it never deals or takes damage.

Generous hitboxes: big for the player, small against them

None of the three should match the drawing. Make every disagreement favor the player: the slash reaches 80 px from the center instead of 60, is 56 px thick instead of 28, and starts 8 px behind the center so a point-blank slash still lands. Enemies are easy to hit, and while they just walk around only their core hurts. When they attack with the body itself, that box grows to the body minus 8 px.

Fighting games keep hurtboxes [close to the model](https://glossary.infil.net/?t=Hurtbox), because every pixel you give one player you take from the other.

How to implement hitboxes and hurtboxes

1. **One body, two areas.** The body collides with the world. The hurtbox can be found but looks for nothing, and the hitbox looks but can't be found.
2. **One layer per team.** Put each team's hurtboxes on their own layer and point every hitbox at the other team's. A hitbox never even sees an ally, so there's no team check anywhere.
3. **One hit per activation.** Keep a list of what the attack has already hit and clear it when the attack starts. Without it, a slash active for 100 ms hits the same target twelve times at 120 ticks per second.

**The code in Godot 4.**

`addons/combat_kit/core/hitbox.gd`:

```gdscript
func _init() -> void:
	monitoring = true
	monitorable = false
	collision_layer = 0
# ...
func _ready() -> void:
	collision_mask = CombatLayers.hurtbox_bit(CombatLayers.opponent(team))
# ...
## Empiezan los frames activos: la lista de golpeados se vacía.
func begin() -> void:
	active = true
	_already_hit.clear()
# ...
	for area in get_overlapping_areas():
		var hurtbox := area as Hurtbox
		if hurtbox == null or not hurtbox.enabled:
			continue
		if not continuous and hurtbox in _already_hit:
			continue
		var hit := _make_hit(hurtbox)
		var result := hurtbox.receive(hit)
		if not continuous:
			_already_hit.append(hurtbox)
```

The hurtbox is the mirror image: `monitoring = false`, `monitorable = true`, and its layer is its own team's.

Quick answers

Is a hurtbox the same as a hitbox?

No. The hitbox belongs to the attack and the hurtbox to whoever gets hit. People often say "hitbox" for both, which is how complaints about someone's "hitbox" end up being about their hurtbox.

Should the hitbox match the sprite?

Not in a single-player action game. The slash box here has about 3.7 times the area of the drawn slash, and the player's hurtbox is smaller than the body. Match the drawing only when fairness between two humans is the point.
