Handle multiple collision masks independently

In my opinion, we should treat multiple collision masks of a sprite independently, imagine if you could do something like give a name to each individual mask and use a new condition to check if the collision occurred with that specific collision mask, instead of using many useless sprites just to act as several collision masks?

Note, there would be 2 different collision conditions, one to check if the collision has occurred in all masks (the current one), and another to check if a specific collision mask has collided another object.

7 Likes

I thought about this these days when I was trying to float an ice cube in my game! The collision mask that served at one point in the code was not appropriate for another moment and I had to create a new object to serve as the second collision mask.

I liked this solution. It doesn’t break the old games. :+1:

2 Likes