I have got trees in a world.
However, these trees can be fairly CPU intensive. As you can see, the far-away island on the left has no trees at all - This is because trees currently have to only render in a short radius of the ship (or lag like hell).
My question is, if I have a single tree, how can I check if that tree is behind the camera?
The location of the ship.
The location of the tree.
The direction of the Camera.
The size of the tree (sortof).
Basically, I would like to compare the direction (and location) in which the camera is looking and then compare it to the tree's location to see if the tree is in front of or behind the camera.