A Godot ^4.2
addon that adds an AnimatedShape2D
node that can customize a CollisionShape2D
for each frame of each animation of an AnimatedSprite2D
.
It is useful to make custom hitboxes, hurtboxes, and hardboxes for each pose of your character,
if you animated it using AnimatedSprite2D
.
It comes with an Editor GUI to preview your shapes, in the fashion of the SpriteFrames
bottom panel.
You can also use it to "tag" specific animation frames with custom metadata.
- customize a shape for each frame of your animations
- store metadata for each frame of your animations
- configurable fallbacks
- editor GUI, updated in real time
- copy & pasting, with either shallow of deep copies
- supports undo & redo where it matters
- dogfed
- extensible
The installation is as usual, through the Assets Library
within Godot, look for AnimatedShape2D.
You can also simply copy the files of this project into yours, it should work.
Then, enable the plugin in Scene > Project Settings > Plugins
.
- Add a
AnimatedShape2D
anywhere in your scene and inspect it. - Target a
AnimatedSprite2D
to read frames from. - Target a
CollisionShape2D
to write to. - Make a new empty
ShapeFrames2D
to store the customization data into. - Add shape customizations to specific frames using the bottom panel.
- Star this repository if you are happy ; share the love!
You can only target one
CollisionShape2D
perAnimatedShape2D
. Make oneAnimatedShape2D
per type of box you want to customize. (hitbox, hurtbox, etc.)
AnimatedShape2D
stores enough data in a ShapeFrames2D
resource to fully configure a CollisionShape2D
for each frame of each animation of an AnimatedSprite2D
.
It listens to the AnimatedSprite2D
frame|animation changes, and updates its target CollisionShape2D
accordingly.
That's it.
🦊 Feedback and contributions are welcome! https://github.com/Goutte/godot-addon-animated-shape-2d