Quantcast
Channel: Questions in topic: "renderer.enabled"
Viewing all articles
Browse latest Browse all 99

Check if a camera is looking at an invisible object

$
0
0
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.

Viewing all articles
Browse latest Browse all 99

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>