- Home /
How to give user controls for the moble devices(Android)
This is my first question on this site and I am new to Unity as well. So please try to forgive my mistakes in the question that I am about to ask.
I have built a simple terrain along with the FirstPersonController and I ran it on my Android device and the outcome is that I am getting the terrain but the problem is I am unable to find nor move the FirstPersonController. The terrain as a whole is moving but I want the FirstPersonController to move.
Are there any extra controls thst needs to be given in order to accomplish my task?
Answer by LukaKotar · Feb 17, 2012 at 11:16 AM
Instead of "FirstPersonController", drag "Player Relative Controls" into the scene. It will automatically add two virtual joysticks on the screen. And you will notice that look up/down are inverted. You just need to modify the "PlayerRelativeControl" script. Just one line. Replace the last line with this:
cameraPivot.Rotate( -camRotation.y, 0, 0 );
(Just added the minus before camRotation to invert it again.)