Is there a way to make a custom hit box?
Example, I would like to make a diagonal box where the missing section doesn’t collide like a regular block. I would like my player to be able to land on the deleted section.
The “Polygon” collision shape will build a hit box that closely aligns with the sprite instead of just using the outer boundaries.
If you want the collision shape to follow a different shape than your sprite, a common approach is to:
- Draw a sprite for the collision shape to use.
- Make an animation with a single frame to display whatever you want, which runs when the game starts
This way, the (hidden) sprite is used to create a collision shape, and the visible sprite doesn’t need to match it.
6 Likes