What problem does it solve?
Manually aligning animated sprites with per-frame collision polygons is time-consuming and error-prone; this skill generates a working Godot 4 integration that keeps hurtboxes and attack hitboxes synchronized to the current animation frame.
Core Features & Use Cases
- Sprite + hitbox conversion workflow: Converts per-frame PNG animation sprites and matching polygon hitbox JSON into Godot
CollisionPolygon2D data.
- Frame-accurate hurtbox/attack behavior: Updates polygons on every animation frame, enabling attack areas only when the frame’s attack polygon is active.
- Facing-direction mirroring: Flips/mirrors hitbox polygons for left/right facing so you can reuse one set of JSON data.
- Debug overlay for validation: Draws transparent hitbox polygons in distinct colors (green for hurt/body, red for attack) to verify correctness in-game.
What it’s best for
Use it when you need reliable hit detection for 2D characters (players and bosses), especially for complex polygon-based attacks where frame-by-frame accuracy matters.
Quick Start
Ask the assistant to integrate the HitboxController component into your CharacterBody2D scene and wire it to your existing animation folders and JSON hitbox files.