My objective is to make something like:
If your character is not on the same floor, the bullet shouldn't hit the enemy and you can jump up and down between floors freely.
Here is a game that uses this mechanic: cross-code.com/en/play
Do you guys know an effective way to do that ?
Thank you for reading!
Develop games in your browser. Powerful, performant & highly capable.
You could use layers (Is on layer), or an instance-variable (via Families) that indicates the floor a character is on. Just add this extra condition for any collision testing.