1

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?

Siamak
  • 1,689
  • 1
  • 17
  • 26

2 Answers2

3

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.

Community
  • 1
  • 1
Programmer
  • 121,791
  • 22
  • 236
  • 328
2

I think that you have a built-in way to do this. Alternatively, you can take a look at the Asset Store, it's a great place to look for piece of codes, assets and stuff. For example you can use in your project these free assets: CN Controls , Standalone Multi-Touch Input Module

Haim Bendanan
  • 741
  • 7
  • 13