Hm... I just thought of one method that might work. I could transform points from the world to the camera view with the appropriate projection commands... But those commands if I'm not mistaken are kind of fidgety and don't return real values if the point ends up outside the screen if I remmeber correctly.
[edit]
Well maybe projecting will work. It seems more reliable than I remmeber it being. The only problem is it does not give you any coordinates if the projected points are behind the camera... Which presents an issue for entities which are very close to the camera, partially in front of it, partially behind it. I suppose I could do some math with tformpoint to flip those points on the wrong side of the camera around the camera's Z axis so that they are in front of the camera so the project function will tell me where they are... Hm...
[edit]
Well maybe projecting will work. It seems more reliable than I remmeber it being. The only problem is it does not give you any coordinates if the projected points are behind the camera... Which presents an issue for entities which are very close to the camera, partially in front of it, partially behind it. I suppose I could do some math with tformpoint to flip those points on the wrong side of the camera around the camera's Z axis so that they are in front of the camera so the project function will tell me where they are... Hm...