3d Menu Items

Currently building a menu using 3d models for buttons. (Think standard HUD menu but with 3D menu buttons!)

They need to be pickable in 3d so I can not use render to target and place them in ortho.

But they must always stay facing the same direction to the screen/camera and move with the camera.



By setting the objects local translation vector to the cameras location does the trick, partially but doesn't keep the node facing the camera.

What is a good way to solve this problem in general? I searched the forum but only found vaguely helpful/relevant stuff.

I created a node that extends the vanilla node, it takes a camera in the constructor. This is called desktop node. The onDraw method translates and rotates the node to match the camera orientation. Is the onDraw method appropriate for this? It works fine but seems iffy.

What about attaching your buttons to the camera node itself? Is there anything wrong with this?

By default its just a camera and not a camera node. But I think that works in reverse to what I need. Using the camera node means you have to move the camera node and the camera follows. The desktopNode follows the camera to provide a local co-ordinate system. This way also means I can use the standard input handlers.