Hello,
the loading state of my game is composed of 3 screens :
guiNode, something that I want to hide (it contains HUD)
2)Nifty screen (with a bar and text )
a third screen that should display both text and 3D objects controlled from java, not Nifty gui (such as a rotating hourglass).
I created a post view port for nifty, so they automatically hide the HUD, and I want to create another post view port for the third screen but I get “IllegalStateException” when attachig the scene to this new viewport. Am I doing something conceptually wrong? Is there a better way to do the loading state described above?
loadingText = new BitmapText(customFont,false);
loadingText.setText("Loading ");
loadingText.setSize(customFont.getCharSet().getRenderedSize());
loadingText.setName("Loading Text");
afterNiftyVP.attachScene(loadingText);
It’s the first time that I create post view, so maybe I miss something. The initialize should be called by JME3 Render thread so I should be able to modify scene from there.
If you are creating your own viewports then you will need to manage the updating of anything you put in it yourself. Once per frame you will have to call updateLogicalState and updateGeometricState on whatever root node you put there.