Cameras won't switch on trigger!
//I'm trying to have it switch camera's once the player walks into a box collider which has //this script attatched to it
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class Cameraswitch : MonoBehaviour { public GameObject CameraOn; public GameObject CameraOff;
public void OnTriggerEnter(Collider col) { CameraOn.SetActive(true); CameraOff.SetActive(false); } } //I have the isTrigger box checked for the camera box collider so I don't know what to do One more thing, this is code I'm trying to translate from javascript the code is in this video and isn't very complicated
Your answer
Follow this Question
Related Questions
Rotate camera when colliding 0 Answers
Cameras won't switch on trigger 0 Answers
Camera movement problem 0 Answers
How to exclude object from near camera clipping 1 Answer
Camera Shake C# Effect 3 Answers