Test it here (WebGL)
Or download apk file and test it on your android device
This asset will provide you with FPS controls for mobile devices that is very easy to setup and use.
How to use it?In case that your character doesn’t have rigidbody you can use this:
transform.position = transform.position + moveX * Time.fixedDeltaTime + moveY * Time.fixedDeltaTime;
- For rotation use JoystickRight.rotX and JoystickRight.rotY.
void Update() { transform.rotation = Quaternion.Euler(JoystickRight.rotY, JoystickRight.rotX, 0); }
• To detect if shot button is pressed you can use JoystickRight.shot static variable. It will return true when shot button is pressed and false when it is released. • To detect if jump button is pressed use JoystickRight.jump. It will return true whan jump button is pressed and false when it is released.