Im making a geometry of a compass that should follow the camera. Such that when i move/rotate the camera, the compass stays in the same position on the screen. But i want the compass to rotate such that the compass north always points in the global 3d scene x-direction, and east always points in the z-direction. And the compass should always be visible/never hidden behind other objects regardless of the camera position.
I can think of 2 possible approaches for this:
Attach the compass to the guiNode. This does everything I want except that it doesnt seem to give a depth perspective on the rotated compass (the part of the compass that is furthest from the camera isnt smaller then the part closest to the camera like it would be if it was attached to the rootNode (3d). Is there any way to get the depth perspective on objects attached to the guiNode?
Attach the compass to the rootNode and calculate the compass position based on the camera position. The problem as i see now is that the compass might be hidden behind other geometries. Is there any way to always draw the compass on top?
Is there some other way of achieving what i want?