I haven't found tutorials that are concerned about deleting scenenodes and entities. I assume that the scenemanager will take ownership of them when they are attached (am I right?). However, I can imagine many situations where I would like to deterministically and selectively terminate objects, for example if I were to use OGRE to display a huge open-world level, I would like to dynamically load and unload parts of the world. How can I do this while also telling the scenemanager that his pointer is no longer valid?


1 Answer 1


Despite the facts that is not recommended to delete entities and scenenodes yourself, did you take a look at the Ogre SceneManager documention ?

In this document you can find the following functions to remove & destroy entities:

And you can find the following function to remove & destroy Scene Nodes:

Anyway don't forget you need to detach entities from the sceneNode first to avoid problems...

Finally I do really recommend you to take a look at the Scene Manager FAQ. This document presents the different ways to manage the scene nodes using BSP, Octree or Portal Connected Zone etc. This is probably better way to achieve what you want to to without having to manage the scene nodes yourself.

  • \$\begingroup\$ If not managing by myself, then what is the preferred way to efficiently load and maintain very big scenes (i.e. open world-type scenes)? \$\endgroup\$ Mar 1, 2012 at 11:57
  • \$\begingroup\$ Octree scene manager could probably fits your needs. The Scene Manager FAQ (introduced at the bottom of my answer) presents you the pros and cons of each Ogre Scene Manager type. \$\endgroup\$
    – Valkea
    Mar 1, 2012 at 13:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .