using Cinemachine; using System.Collections; using System.Collections.Generic; using UnityEngine; public class CamController : MonoBehaviour { /// /// 静物球 /// public GameObject paperBall; /// /// 是否越墙 /// public bool isEnter; private void OnTriggerEnter(Collider other) { if(other.tag.Equals("Wall")) { if(isEnter) { paperBall.SetActive(false); isEnter = false; } else { paperBall.SetActive(true); isEnter = true; } } //else if(other.tag.Equals("Door")) //{ // paperBall.SetActive(true); // isEnter = false; //} } }