Search code examples
mobileunity-game-enginegame-engineunityscript

how can i implement first person controller movement touch keys for android devices in unity 4.5


i'm new to Unity . i have a simple Terrain in my unity project. what is the simplest way to implement touch joystick buttons to my project so mobile users can move around with?

something like this mobile movement joystick example image

when i export my project for PC it works fine by keyboard keys but what about android/iPhone users?


Solution

  • You need a Virtual JoyStick. Simply posting code here is not enough to get you started. Watch this video, it shows how to make one from start to finish.

    For more examples about moving the character, look at the code in this question. The question contains code for moving the character with the keyboard and the answer explains how to move it with touch (Virtual JoyStick) on Android.