Hello everyone,

I'm not completely new to Godot, but I'm trying to learn more about the best practices for using the engine.
I'm currently trying to implement a combo system for a platformer game. As each attack has a different hitbox size, I've added a different Area2D node per attack.

I've done that by adding multiple Area2D for each attack:

My question is, is it better (performance-wise) to have multiple Area2D and enable/disable them after each attack or have a single Area2D node and switch the collision shape with every attack?
I thought also about changing the region of the collision shape programmatically, but isn't that worse?

I'm not sure, but I'd like to hear your opinion or experience if you have worked on such a system differently!

    Memoni multiple Area2D and enable/disable them after each attack or have a single Area2D node and switch the collision shape with every attack?

    the first since the nodes will remain in memory, but try to combine the colliders as children of the same Area2D and try to enable/disable the colliders instead.

    Memoni I thought also about changing the region of the collision shape programmatically, but isn't that worse?

    this is a much better option if the region is made up of simpler collision shapes (not a polygon). you could try animating a bunch of box colliders to create the shapes, or better, use a skeleton2D.
    In my case i did hit-boxes using remote nodes, which copy transforms from a boneAttachment3D to the colliders that are inside an Area3D. It shouldn't be too different for 2D.

      Jesusemora Thanks for the suggestion!! I've never thought about using Skeleton2D. I'll give both solutions a try and see which works best.