I use a root SceneNode for each player in my app. All other items pertaining to the player are attached to this root player node. The root player node may have mesh(s), light(s), billboard(s), etc attached to it. I am trying to dynamically load and unload root player nodes as players come and go. What is the best method to unload? Will removeAndDestroyAllChildren do what I need it to do?
BTW, What does removeAndDestroyAllChildren actually destroy? Does it only destroy only SceneNodes? What about Billboardsets? Lights? Meshes?
In other words, is it the same as SceneManager->clearScene() but only starts with the given node (this is what I am looking for!)?
Removing Ogre Resources
-
DWORD
- OGRE Retired Moderator

- Posts: 1365
- Joined: Tue Sep 07, 2004 12:43 pm
- Location: Aalborg, Denmark
So child scene nodes will be destroyed, but you'll have to destroy the actual entities, lights etc.The docs wrote:Ogre::SceneNode::removeAndDestroyAllChildren()
Removes and destroys all children of this node.
Remarks:
Use this to destroy all child nodes of this node and remove them from the scene graph. Note that all objects attached to this node will be detached but will not be destroyed.