I’ve been doing some work on the HUD for my game, and everything works fine when I use “flat” nodes in the hud - that is, when everything I want to display has no “depth” in the Z axis. Quads with no Z translation work, but if they are translated in the Z axis they disappear. A Sphere is invisible, unless I show polygons, in which case I see a ring which looks like the cross section of the Z=0 plane and the sphere.
Here’s a screenshot of a section of the HUD which should have a quad, a sphere and a rotated open ended cylinder (in polygon render mode):
You can see the quad in the center, which is fine, but the sphere becomes a circle, and the cylinder becomes two lines where it intersects Z=0. The stuff in the bottom right is just a non-hud mesh.
The hud node is just attached to my root node, and set up with the following code:
//Create alpha state to blend using alpha
AlphaState as = display.getRenderer().createAlphaState();
//Create disabled light state, hud nodes will be displayed
//as unlit colour
LightState ls = display.getRenderer().createLightState();
//Node uses ortho rendering
//Never cull hud items
Does anyone have any ideas as to how I can display orthographically projected 3D meshes in a HUD? I want to use it for stuff like dials, etc. (the old-style ones made from a rotating cylinder with numbers printed around the outside, spinning around the X axis of the screen).
(Edit) I just tried scaling the sphere/mesh and if they have very low scale in the Z axis they are visible.