Shamba

cam_pro_changer

Dec 25th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class cam_pro_changer : MonoBehaviour {
  6.  
  7.     public Camera main_cam;
  8.     public bool isOrtho = false;
  9.  
  10.     private void OnTriggerEnter(Collider other)
  11.     {
  12.         if(other.gameObject.tag == "Player")
  13.         {
  14.             main_cam.orthographic = isOrtho;
  15.         }
  16.     }
  17. }
Add Comment
Please, Sign In to add comment