Invisible hitbox on a platform

I was creating a platform with movement, I remember it was simple but that’s not the problem, when my character gets on the platform there is like an invisible hitbox and I don’t know how to fix it.

Check the hitbox of your character. It may well be a lot larger than the visible pixles of the image on screen. It defaults to the border of the entire image, including any transparent parts of the image.

You can change the hitbox by clicking on Edit Collision Mask :

And then clicking on Use A Custom Collision Mask

You can add more vertices and drag them around. Make sure the angle between 3 sequential points is 180 degrees or less (you’ll get a warning message the polygon is not convex), otherwise the collision mask you create will not be used, and GDevelop will default to the whole image.

Note, the red square is the default hit box

1 Like