I'm making a Mario clone, and trying to make a Goomba. The Goomba should turn when it touches the wall.
Here's the code:
Here's what happens however, why doesn't this work?
Develop games in your browser. Powerful, performant & highly capable.
Goomba on collision with wall, if mirrored set not mirrored, Else set mirrored.
Mind you this should only set the sprite mirrored, but not the movement. You also need to mirror the movement.