Skip to content

A Godot 4 demo that showcases how to use hitboxes and hurtboxes for handling combat interactions between characters and objects.

Notifications You must be signed in to change notification settings

gdquest-demos/godot-4-hitbox-hurtbox

Repository files navigation

Hit and hurt boxes

This demo shows how to work with what we call hit and hurt boxes.

To detect interactions in games, we generally use simple geometry: boxes, capsules, circles, polygons. In godot, we achieve that with area nodes.

You can use area nodes for many tasks like interacting with a door, a chest, collecting a pick-up, or dealing and receiving damage.

The role of a hit box is to deal damage to something that has one or more hurt boxes. The hit box represents the part of a weapon that deals damage while the hurt box represents the part of a character that can receive damage.

Controls

  • WASD: move the sword.
  • Space: attack.

About

A Godot 4 demo that showcases how to use hitboxes and hurtboxes for handling combat interactions between characters and objects.

Resources

Stars

Watchers

Forks

Packages

No packages published