Touch device problem


#1

Hi guys, I made an Endless Runner Up and almost finished the game, but I have a big problem to solve first.
Practically as soon as the game starts, the Player always goes to the right without stopping, while if I click the left button, the Player stops instead of going to the left … you know how I can do that if I remove my finger the player stops and if I click right goes right, left left ?? Please help me


#2

You need to add cursor or touch is pressed to only trigger when touching. A touch is basically moving a virtual cursor at a place, so if you don’t touch elsewhere it stays true unless you add a condition checking for the touch making sure it is pressed.


#3

Hi thanks, can you tell me how to do it?


#4

I mean what should I change of the screen I sent (the game will be for mobile)


#5

At the beginning of the scene: “Move mouse cursor when touching the screen”
:wink:


#6

Hi, thanks a lot for the answer … now the character if I don’t touch the screen remains still, if I jump it jumps once and if I click left it goes left … only thing, if I click right the character doesn’t move, what I was wrong?


#7

from your screenshot I don’t see anything strange, maybe there is some syntax error


#8

how could I do? I’ve been trying everything for days but I can’t…


#9

try to send me the screen of the other scenes, maybe there is conflict with the player controls


#10


#11

I would say they are the codes of the whole game, sorry for the inconvenience