Hi guys:
I’m trying JME AWT Canvas. I found an interesting thing here. It seems that the guiNode’s Z-order is reversed in Canvas mode. I run the JME testcanvas.java and it looks like the StatsView failed to display. Then I tried my own code still same problem.
I found a way to solve this problem by changing the Z-order of StatsDarken or Statictice View
public void simpleUpdate(float tpf) {
//cre is a + to represent a mouse courser , you will find interesting rendering when it moves to the Statistic View area
//the next two code lines both works
//StatsDarken are supposed to be transparent but it is Not to the Statistic View node
guiNode.detachChildNamed("StatsDarken");
//this line works as well, just bring the SV to a "higher" z value
//guiNode.getChild("Statistics View").setLocalTranslation(0, 0, -9);
rootNode.getChild("Box").rotate(2*tpf, 2*tpf, 3*tpf);
Vector2f k2d = inputManager.getCursorPosition().clone();
BitmapText ch =(BitmapText)guiNode.getChild("crs");
ch.setLocalTranslation(k2d.x- ch.getLineWidth()/2, k2d.y+ ch.getLineHeight()/2, 0);
}
From my point of view: the Z values of guiNode are not correctly rendered in AWT Canvas mode. Is this a bug or my misunderstanding of the engine code ?