I know how to check if the renderer is visible, but I want to know if a camera is looking at an object WITHOUT a renderer enabled. I don’t want an object to enable rendering when a camera is looking in its direction. But when I use
if (boolName && !renderer.isVisible) { renderer.enabled = true; }
it renders anyway because renderer.enabled
is false when that code is executed. This can be achieved by complex raycasting, but I don’t know how to do that and I’d rather not add 50 extra lines of code. Thanks.