How do I retrieve a SimpleApplication's rootNode from another class?

I need to get the rootNode for an appState class. Could someone help?

The initialize() method is passed the Application, so you can cast that to a SimpleApplication and get the rootNode from that.

@wezrule said: The initialize() method is passed the Application, so you can cast that to a SimpleApplication and get the rootNode from that.

I did that a long time ago, but there is no .getRootNode() method.

I think you’ll find there is

@wezrule said: I think you'll find there is

Whoops, my noob instincts kicked in, and made me wasted a lot of time by not changing the instance variable’s type from Application to SimpleApplication. Thanks!

@coolman50544 said: Whoops, my noob instincts kicked in, and made me wasted a lot of time by not changing the instance variable's type from Application to SimpleApplication. Thanks!

Thats what “casting” means and wez told you to do :wink: