How to know what is on the camera?

What is the best way to:

  1. Determine if a given Node is currently in view of the camera, and/or

  2. Get a list of all nodes currently in view of the camera?

“in view of the camera” is a complicated question to ask. But you can ask if a certain point is in front of the camera. Try searching the forums for isInView().


Yeah, I’ve read through forum stuff and see how to use isInView. In my case, occlusion doesn’t matter – I was just hoping there would be a list of nodes that are rendered kept somewhere so I could perform some operations on just the items that are on camera, such as checking their distance in order to determine whether or not to render text above them.

I have a lot of nodes (30k+), so looping through them and checking the distance to all of them (or even if all of them are on camera) is expensive. I have camera-based collision detection going right now, but that, for some reason, slows things way down above a certain size of the CollisionSphere centered on the camera.