Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
How do I make touch control to make sprite move left and right only
Did you try to use the "Custom Movement" behavior ?
You can use it to make go left or right when a key is pressed.
I wanna do it by touch control
compare your Sprite.X with Touch.X
if Touch.X < Sprite.X == move left
if Touch.X > Sprite.X == move right
Use the "Custom Movement" behavior to the sprite and "On Touch objet" == Sprite , "simulate control"
Thank you for helping
Develop games in your browser. Powerful, performant & highly capable.
I'd probably use 8 directional movement and then compare the touch.x to the object.x and if it is was not equal have it simulate movement. However in my game I made like this I believe I decided to not want it to go to the dead center of the object so I used two vents to check if it was greater then object.x+32 and a second event to check if it was less then object.x -32 or something along those lines.
there are many way to make control touch ( left and right) . thanks
Learn more with demos: