Question by
bucho_junior · Jul 01, 2020 at 05:17 PM ·
ontriggerentercamerasjava to c#
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
Comment
Your answer
Follow this Question
Related Questions
Cameras won't switch on trigger! 0 Answers
multiplayer roll-a-ball camera issues 1 Answer
Problem with HDR (I think?) 0 Answers