[Solved] Using collision masks of animation as hitbox

In attached example I want to use secondary object (copy of hero) with collision masks set on each frame of animation for attack (Special attack) as a hitarea (collision with enemy). However I can not manage it to work correctly.

Instead it looks like only first collision mask of first frame (of attack animation) is considered and rest are ignored. I am not sure what I am doing wrong.

Here is game:

Here is whole code:

Secondary object FireKnightAttack does not have a Platformer Character behavior.

Hey, I can confirm this seems to be a bug.

I tried it on a blank project, just an object placed in the scene with a looping animation and a different collision mask for each frame.

The animation plays but the collision mask stays stuck on the first frame.


1 Like

This was caught this morning, looks like Davy has a fix in here: Fix Sprite collision mask updating when animation frames have different ones by D8H · Pull Request #6504 · 4ian/GDevelop · GitHub

Should be live in the next release version.


Is there a way how to get informed about this fix being deployed to production?

Sure, you’d need to do the following:

  1. Click the link I posted above to view the update on whether it has been merged or not (it has)
  2. Review the date it was merged (2 days ago as of this posting)
  3. Click the Code tab at the top and scroll down to the “releases” section.
  4. Review the latest release date.
    As soon as the PR is merged, any release after that merge date will include that code.
1 Like