Advertisement
kasru

Camera Switch

Jan 11th, 2013
3,755
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //****** Donations are greatly appreciated.  ******
  2. //****** You can donate directly to Jesse through paypal at  https://www.paypal.me/JEtzler   ******
  3.  
  4. var camera1 : Camera;
  5. var camera2 : Camera;
  6.  
  7. function Start () {
  8.  
  9.     camera1.camera.active = true;
  10.     camera2.camera.active = false;
  11. }
  12.  
  13. function Update () {
  14.  
  15.     if(Input.GetKeyDown("k")) {
  16.         camera1.camera.active = false;
  17.         camera2.camera.active = true;
  18.     }
  19.  
  20.     if(Input.GetKeyDown("l")) {
  21.         camera2.camera.active = false;
  22.         camera1.camera.active = true;
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement