Now I can remove the whole scene (all imported models) with:
sceneNode.detachChild(modelNode);
But how can I detach one of this to model?
But how can I detach only the one model?
How get I access to the nodes Male and Female in the scene explorer? To detach or attach them?
Hopfully, that somebody can help me with this newbee question.
Google “scene Graph jmonkey wiki” there are a lot of ways.
Way a) known structure: cast your Scenemodel to the Node Type → use . GetChild() a few times and then RemoveFromParent (). This does the same as detachChild on the rootNode.
Way B) use a SceneGraphVisitor (slow!) this goes to all subnodes and Calls a callback.
There you can use getName() to Check for female and then RemoveFromParent.
Note: read out about app.enqueue() or else your remove Call will Crash Java with an exception