I'm trying to basically have a camera view for first person, third person, and aiming in on a scope. First person is right alt, third person is left alt, and aiming in is right click(Fire2). When I play it, the third person and first person inputs don't work. If I take out the code where it aims in on the scope, it works though Here is the code without the aiming in part Code (csharp): if (Input.GetButton("third person")) { if (toggleCamera) { toggleCamera.camera.enabled = true; mainCamera.camera.enabled = false; } } if (Input.GetButton("first person")) { if (toggleCamera) { toggleCamera.camera.enabled = false; mainCamera.camera.enabled = true; } } and if I add this, the third person and first person toggle don't work Code (csharp): if (Input.GetButton("Fire2")) { if (AimCamera) { AimCamera.camera.enabled = true; mainCamera.camera.enabled = false; } } else {
What's inside the "else" block at the bottom of the posted code? That's going to be executed any time the input is *NOT* "Fire2". So, when the "third person" or "first person" code is accessed at the top, the "else" code will also be accessed - which I'd guess is your problem. Jeff