i am trying to create a game with two virtual joysticks.The first to control the player movement and the other to control the camera attached to the player.I want it to be a joystick movement mapped to the camara's rotation.How do I go about it ? The player movement works fine.
Asked
Active
Viewed 1,709 times
-3
-
what you tried so far – IntelliJ Amiya Aug 02 '16 at 06:02
-
i tried attaching the mouse look script and activating it through the press of a UI button.But i want it to be a joystick movement.Any ideas ? – Saranya Ananthakrishnan Aug 02 '16 at 06:12
1 Answers
0
Depends on if you intend to script it yourself. If so, you can use the input of the virtual joystick to rotate the transform of the camera.
Camera.main.transform.Rotate(new Vector3(virtualjoystick.x ... ));
And in third person you could make some snazzy function to orbit the camera around the player. You can google for that. I found these guys doing that in two lines. http://forum.unity3d.com/threads/rotate-the-camera-around-the-object.47353/
If you're not scripting yourself, you're going to have to find an asset package online.

Ozitiho
- 346
- 2
- 9