I have two physics bodies
Player:
physics.addBody(
gc.player.sprite, “dynamic”,
{ density = 35, friction = 0.1, bounce = 0 , shape = polyBody},
);
Snake:
physics.addBody(enemy.sprite, “static”, { density = 1, friction = 0, bounce = 0, isSensor = true });
The snake is moving and the player isn’t moving
When the snake collides with the player, a collision event with the “began” phase is triggered.
However when the snake moves past the player, no collision event with the “ended” phase is triggered
How do I fix this?