Two fingers control movement

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By danilo00782

There 2 touchscreen buttons one from the left, second from the right. And what I need to do is you can press, for example, right the body moves right, then you are not releasing right, pressing left, the body moves left, instead right.

:bust_in_silhouette: Reply From: Bimi124

try out a creating variabe - lets take speed - and make sure it’s global. So if the left button is pressed you set speedto -1. If the right button is pressed set speedto 1. If one button is released you need to check if another button is pressed and if not you can set speedto 0.
If you’re done you can use speedto move the body.