Forum

Character movement with keyboard and touch screens

17 August 2020 22:49
Hello people,
I apologize in advance for my English as a Google Translate.

I am developing a Financial Education game with Blend4Web with part of my Doctoral Thesis.
In summary, I have a character who, when running on a computer, will be moved using the arrow keys on the keyboard or WASD, but when running on a smartphone, it will be moved by the touch screen.

The first part of the problem (running on the computer) I solved using the example code (Gamepad) included in the blend4web package (Code Snippets).
However, as I am a beginner in programming, I have no idea how to make the character's movement work on touch screens.

Can anybody help me?
If possible, I would like the simplest possible solution, as I just need to move a character forward, backward, left and right, while executing a walking animation.

Thank you in advance to anyone who can help me.
 
Please register or log in to leave a reply.