Unity how to make a Visual JoyStick in Unity
You can implement your own Visual Joystick by using the Unity new event callback functions such as OnBeginDrag
OnDrag
and the OnEndDrag
function. There is a already made Visual Joystick package out there for Unity, so implementing your own is like reinventing the wheel.
All you have to do is to import the CrossPlatformInputManager
package from Unity's UnityStandardAssets then use CrossPlatformInputManager.GetAxis("Horizontal")
and CrossPlatformInputManager.GetAxisRaw("Horizontal")
to read the direction of the image/thumb.
To make one from scratch, you can flow this video tutorial.