My JME App extends SimpleApplication. I added an ActionListener that handles a function key. The listener has this code:
if (flyCamAttached) {
flyCam.unregisterInput();
} else {
flyCam.registerWithInput(getInputManager());
}
flyCamAttached = !flyCamAttached;
So far this works: I can press the function key, disengage the JME app window and do stuff in other windows. Then click into the JME app window to give it focus and press the function key to give JME the mouse and keyboard back.
With this in place I added functionality to add new objects to the scene graph using: rootNode.attachChild(geo). What I’m seeing is that the objects added after unregister/register don’t interact with the fly cam the same way as the objects added initially - specifically they seem to be “stuck” in the same plane as the flycam. So for example if I rotate left - the objects placed into the scene graph initially move right as expected. But the objects added after unregister/register move with the camera meaning - as I rotate left they also rotate left so I’m always viewing them with the same perspective.
Any guidance is appreciated.