Instead of entityvisible and entitydistance you could also do ...
tformpoint entityx(tree), entityy(tree), entityz(tree), 0, camera
and check the returned tformedz() ( assuming >0 ) to see how far in front of the camera the tree is for lod / hiding. It may be a bit faster than a combination of the other two.
Stevie
tformpoint entityx(tree), entityy(tree), entityz(tree), 0, camera
and check the returned tformedz() ( assuming >0 ) to see how far in front of the camera the tree is for lod / hiding. It may be a bit faster than a combination of the other two.
Stevie