I was wondering if there is a sure fire way to tell if the scene is loaded and rendered/Visible?
I am working on a title menu witch uses a j3o scene as a rotating background. I switch from this screen to a loading screen call all the methods to load the level and then switch to the game HUD but I get a black view port for a second then the scene pops into view.
I have used a timer to sleep on this but is there a better way?
You do all scene attaching etc, how come you don’t know when that happens :?
The scene is loaded after you call loadModel() on the assetManager. The scene is visible when you attach it to the root node.
What you can do is put a quad with a black texture covering the entire screen for a second (many games do this while loading a scene) instead of that wait.
2 Likes
@madjack said:
What you can do is put a quad with a black texture covering the entire screen for a second (many games do this while loading a scene) instead of that wait.
I will try this but wouldnt this be the same just with a quad?
I also found if t just load the level geom then load everything else at run time the issue is gone.
@skidrunner said:
I will try this but wouldnt this be the same just with a quad?
I'm not sure I understand what you're saying. A quad from zero zero to height width, colored black on the Gui bucket. You could even use a nifty layer+panel using width 100% and height 100% with a black color.
I didn't mention nifty because I don't know if you use it. If you don't it's not worth it simply to add a black panel that will cover the screen. A quad takes a whole lot less memory.