Control Freak 2 is a multi-platform input system that supports multi-touch, accelerometer, keyboard, mouse and game controllers. It can help you a lots with deal input module, and works for android / iOS device at the same time. For more information, you can check the unity asset store.
To lean how to use it, you can watch following video. Although this video was made 9 years ago, but it is still useful and works with the latest version 2.8.10. Grab the general ideas, and integrate in your project so easy!
NOTE: go with ControlFreak2 workflow, and DO NOT drag those MonoBehaviour scripts into gameobject directly. Because we need to keep some interlink-ships and some configure parameters among ControlFreak2 input module. This is very very important to make everything works correctly, and save a lots of re-do and re-check work!
To get a smooth input for camera look in FPS game, you need to set 2 things correctly:
- Set Touch Smothing to 0.5 in TouchTrackPad
- Set Scale to 0.1 for “Mouse X” | “Mouse Y” Virtual Axes In InputRig
Just as settings in the following image:
