The object should face left or right depending where the user clicks/touches.
Object.X < Touch.X = Not Mirrored
Object.X > Touch.X = Mirrored
The object is facing right (Not Mirrored) by default, but when the game is loaded the object faces left (Mirrored) and automatically reverts back to left even after facing right.
Using the Mouse function the code below works fine, but switching to the Touch function the error mentioned above happens.
Object.X < Mouse.X = Not Mirrored
Object.X > Mouse.X = Mirrored
Does anyone have insight as to why this happens? This is the first time I am trying to use the Touch function.
Develop games in your browser. Powerful, performant & highly capable.
Touch.X will return 0 when not touching.