How do I make an ortho HUD track+overlap visible planets

Hi everyone!

Just a little background as I'm new on these forums, while I program for a living, I'm a newbie at JME and anything 3d related. I decided to code a X4 space game with jmonkeyengine for fun, and to learn a thing or two. :slight_smile:

On to my question.

I have several planets scattered across a scene, which may or may not be in view. I want to hover a HUD in the top right corner of each visible planet with some text (planet name) and some icons indicating the current state of the planet.I currently have a textured quad on a BillboardNode, but the indicator becomes unreadable at a distance and the orientation is giving me some problems.

Can I somehow detect what planets are visible on the camera and which are not during updates? Are there any better ways of doing this?


You might consider using Text, a text label, or one of the ui kits and draw your planet name/icons in ortho mode, setting the position on the screen using DisplaySystem's getScreenCoordinates method.  Another benefit to using that method is that you can test the x, y and z of the returned screen coordinates to determine if the planet is in view (there are other ways too of course.)