ArchieChoke
New member
Thanks for the example. Using the input string "return" on the keyboard starts the camera change? Seems pretty straight forward.Aye this. Create a 2nd cam, make it a child of the player and then use a script to switch between the 2. example
Code:var cam01 : GameObject; // first person camera var cam02 : GameObject; // third person camera var player01 : GameObject; //first person controller var player02 : GameObject; //third person controller var check; // New check-variable //start with first person active function Start() { cam01.gameObject.active = true; cam02.gameObject.active = false; player02.GetComponent(CharacterController).active = false; check = true; } function Update() { if (Input.GetKeyDown ("return")) { if(check) { cam01.gameObject.active = false; cam02.gameObject.active = true; player01.GetComponent(CharacterController).active = false; player02.GetComponent(CharacterController).active = true; }else{ cam01.gameObject.active = true; cam02.gameObject.active = false; player01.GetComponent(CharacterController).active = true; player02.GetComponent(CharacterController).active = falsee; } check = !check; } }
