- Home /
How to switch between cameras/players?
I'm making a game where you have to scan an area with a plane and then switch back to an artillery unit and shoot enemies. I don't have any clue how to do this though. I know how to set up the characters and stuff. Is there a way to click on a button that switches the player? Like in the Lerp 2D tutorial game where you could switch between Lerp and the spaceship. I'm doing this in 3D by the way, Thanks!
Answer by syclamoth · Oct 25, 2011 at 11:23 PM
You have two 'camera angle' transforms, which you switch the camera between using
Camera.main.transform.parent = newCameraAngle;
Camera.main.transform.localRotation = Quaternion.identity;
Camera.main.transform.localPosition = Vector3.zero;
Then, do whatever scripting you want to do on those two camera angle transforms to manage their movement.
Your answer
Follow this Question
Related Questions
Two player cannonball scene, need scripting help 1 Answer
Player rotates with camera(face same direction as the camera) 1 Answer
MiniMap with player and object icons 1 Answer
Camera problem 2 Answers