I'm making an android game. I have a cube that moves forward by applying force on it (so when i colide i get a better effect) so now i need help to make controls for android. I tried making buttons but i cant get them to (while holding it down) apply force to left or right constantly.
Asked
Active
Viewed 48 times
1 Answers
0
You need to set an OnTouchListener on the button. And start applying force when the user presses the button, which is ACTION_DOWN event, until user lifts his finger, which is ACTION_UP event. You need to optimise for dragging and multi-finger.

Ravjit Singh
- 798
- 5
- 17