How do I move an object (like a car), around in any direction, with touch swipe? Can someone post a capx, showing how to do it?
Develop games in your browser. Powerful, performant & highly capable.
have a look here:
https://www.scirra.com/tutorials/1049/s ... -on-object
https://www.scirra.com/tutorials/726/sw ... hange-page
Hey Cybersurfer5000, the "on-object" tutorial seems to be the right fit for my game, but when I tested the capx, instead of the blue box moving around in the direction that I swipe, a message just pops up saying "swipe left", or "swipe right", etc. How do I make the blue box actually move around in the direction I swipe?
Or rather, this capx seems to work a little better, https://dl.dropboxusercontent.com/u/541 ... swipe.capx Although, the problem with this capx is that it moves the background (stars) around, instead of the car. In this capx, how do I change it so that the cars to move around in the direction I want, instead of the stars/background?
Hello I am having same question so bumb after a long time please I will be really glad for any help how to move object by swiping thank you!
It seems the above links show you how to detect the swipe, so all youd have to do is attach the movement action to the detection..
You could easily set a global variable to "left" for example..
Check the value of the global variable and attach the movement action you'd like when the direction of the swipe is "left"