How do I switch direction of platform player on one tap?
left to right or vice versa
Develop games in your browser. Powerful, performant & highly capable.
Suggestion would be to check the x value of the touch. You could then simulate a left movement if touch x is less than player x. Opposite of course would be that a touch x greater than player x would simulate a right movement.
If you'd like to toggle on tap you could use a boolean variable on the player and toggle boolean on tap..
then have an event
if boolean = true - platform simulate pressing right
else - platform simulate pressing left
Awesome thanks the boolean works perfect.