How is the correct and safe way in Irrlicht for switching in a game from the first to the second level. In each Level all nodes in the scene (and perhaps the scenemanager) should newly be built.
pScenemanager->clear() ?
delete pSceneManager ?
Or have all nodes to be dropped?
Has anyone some experiences on this issue?
Is there an tutorial or demo showing this?
Games with more than one level
Well, drop all scenenodes that do grab the level scenenode. Then drop the level itself and create all needed scenenodes and attach them to the level scenenode again
functions you may need:
functions you may need:
Code: Select all
virtual void irr::scene::ISceneNode::remove () [inline, virtual]
Removes this scene node from the scene, deleting it.
virtual void irr::scene::ISceneNode::removeAll () [inline, virtual]
Removes all children of this scene node.
virtual void irr::scene::ISceneNode::removeAnimator (ISceneNodeAnimator * animator ) [inline, virtual]
Removes an animator from this scene node.
virtual void irr::scene::ISceneNode::removeAnimators () [inline, virtual]
Removes all animators from this scene node.
Please send me an e-mail instead of a private message.