Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer
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)? – Tamás Szelei Mar 1 '12 at 11:57
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. – Valkea Mar 1 '12 at 13:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.