Sorry if something similar has been asked. I’ve done some searching and didn’t find anything. I’ve had an issue for a while where if my player walks right up to a cube, a 3d model, etc and gets too close they’ll see right through it. The standard fix has been to adjust my clipping planes down, but that never worked. (to the shock of everyone - myself included - who said that was the entirety of my issue.) Anyhow, a buddy of mine told me about a clever sounding trick that he had heard about, but never implemented, which I just tried with no success, but before giving up on it I thought I’d toss it to the community to see if it might be a viable option. Essentially, what it involves is making a second camera. (In my case I simply copy and pasted the main camera, changed the tag, allowed it only to see items tagged “building” in the culling mask and removed non - essential items, like the audio listener. I then enabled and activated that camera alongside my main camera, and it took over, so that the ONLY thing I saw were buildings. So I simply enabled it via script, and that meant that only the main camera was active. (so buildings didn’t appear at all.) I’ll be honest, I’m not married to this idea, and I can walk away from it, but just want to see if what has been suggested is possible. Thanks for your time / help, and God bless. ![]()
using UnityEngine;
using System.Collections;
public class MainMenuCameraSwitch : MonoBehaviour {
public Camera camera1;
public Camera camera2;
public Camera camera3;
bool camera1ActiveBool;
void Start () {
camera1.camera.active = true;
camera2.camera.active = false;
camera3.camera.active = false;
Time.timeScale = 0;
camera1ActiveBool = true;
}
void Update () {
//use whatever button you want to toggle
if(Input.GetButtonDown("Action")){
if (camera1ActiveBool == true)
{
camera1.camera.active = false;
camera2.camera.active = true;
camera3.camera.active = true;
Time.timeScale = 1;
camera2.enabled = true;
camera3.enabled = true;
camera1.enabled = false;
Destroy (this);
//camera1ActiveBool = false;
}
else if (camera1ActiveBool == false)
{
camera1.camera.active = true;
camera2.camera.active = false;
camera3.camera.active = false;
camera1ActiveBool = true;
}
}
}
}