Auto Hitbox Generator
Author production 2D collision polygons from sprite alpha. Trace, drag vertices, validate, then export Godot, Unity, Matter.js, Box2D, SVG, or JSON — entirely in your browser.
Trace workspace
Load a sprite, tune the trace, drag vertices — author the collider before export
Sprite
demo_sprite.png
Trace settings
Higher ignores soft anti-aliased edges and glow.
0 keeps every boundary pixel. 1.5–3 suits most sprites.
Negative for a fair player hurtbox, positive for generous pickups.
Unity / Box2D units
Must match Unity Pixels Per Unit (and Box2D pixels-per-meter scale).
No collision polygon yet
Load a PNG with a transparent background, then adjust the alpha threshold until the silhouette is traced.
player_idle.png · 32×32 · RGBA
Vertices
—
From
—
Reduced
—
Coverage
—
Live output
Inspect, validate, and export production collision data
Nothing to author yet
Trace a polygon in the workspace — inspector, validation, and exports appear here.
Templates & examples
Collider presets tuned per role — applied instantly
Professional tips
Only what changes the collider you ship
Simplification
Raise tolerance until the overlay barely drifts from the art, then step back once. Most sprites land at 10–24 vertices with no gameplay difference — physics cost scales with vertex count, not visual fidelity.
Convex vs Concave
Use convex for projectiles, pickups, and anything numerous. Keep concave for terrain and large static props where the silhouette genuinely matters. Engines decompose concave shapes — it is never free.
Physics Optimisation
Ship one stable collider per actor role (hitbox vs hurtbox). Prefer ≤16 vertices for movers, keep pivots matched to your engine import, and clear validation (no self-intersections or tiny edges) before you paste into Godot or Unity.
Professional workflow
Where Auto Hitbox sits in a real 2D production pipeline
Comes in from
Bitmask Autotile GeneratorHands you a bitmask terrain sheet your tilemap can auto-place.
This step · Collision & Physics
Auto Hitbox Generator
Produces a traced collision polygon fitted to your sprite silhouette.
Goes out to
Polygon Collider SimplifierNeeds a traced collision polygon fitted to your sprite silhouette.