Player moving on my phone without doing anything

hello my game is a platformer and when i m playing on my phone first ther is the menu and after touching the screen of my menu my game is strating but if i touch on the right side player go right if i touch left he go left ect… what can i do for that ?

hi
nothing happens in preview mode?.
Do you control touch events? I guess it could be related to this

yes for my menu i did
when the cursor is on background
touch or left mouse button is down change scene to game

i mean on the game scene, you said that if you touch screen player moves, so do you have any action for mouse down or touch or something to move player?

yes i have the action are for mobile on button for right left ect thats on touch screen

sorry I didn’t undertand your first post. my bad :sob:
You can check the action left button down or touch.
then get mouse X coordinate if > windowscene.width/2 touched right side of screen if not touched left side of screen
Other possibility is to add sprites simulating buttons for left and right and check if they are touched. Therw is an example on the paltform example

ok ty it s now working ^^

glad to help, sorry didn’t undertand you the first time :sleeping: