Problems with the Collision Mask

Do you think the green rectangle could be used for the collision mask?

Note that you will have other issues with a collision mask that is not at the center nor symmetric (because the character could go inside a wall just by flipping). You can use another object to do the collision like in the platform example.

Isn’t that more dependent on the center point not the collision mask? Sprite flipping shouldn’t impact the collision mask, should it? (Otherwise that breaks a lot of commonly used art assets/method)

I think the issue was resolved - the OP had a collision mask that was not convex (i.e. it had interior angles > 180 degrees). This causes the default hit box to be used instead, which is the rectangle covering the whole image.

You’re right, the center can be moved at the center of the rectangular hitbox.

My example don’t worked because it’s not convex, but the colision mask of Kater don’t worked because like 4ian said: Custom hitboxes are indeed not supported by the platformer object behavior - only the rectangle surrounding the red polygons will be used. I edited my comment because I think i didn’t explain it very well.

1 Like