image

Emanuele Feronato wrote a tutorial some-time ago about how to handle jumping on enemies heads using Arcade Physics. This has now been updated for Phaser 3. You can find the full source and details behind it in his blog post:

"Our hero is the green character, while the red one is the enemy. Both characters run and change direction once they hit the wall, and you can make green character jump by clicking/tapping on the canvas.

If red character hits green character, the game restarts. Try to jump over the red character and you will bounce over it.

This is made by checking the side of the collision between red and green character. We can say the green character is jumping over the red character when the red character collides on its TOP side while the green character collides on its BOTTOM side."

Read More