Unload terrainscenenode

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
diho
Posts: 46
Joined: Fri May 20, 2011 9:01 pm
Location: Netherlands

Unload terrainscenenode

Post by diho »

Hello all,

I have a question regarding unloading a terrainscenenode. What is the best way to do this? My gues is node->remove();, but I am not sure if that's all I need to do. Furthermore, if I created a triangleselector from this node, and added it to the camera via an animator, will it automatically be removed, or is this a manual thing to do?

-Diho
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Unload terrainscenenode

Post by CuteAlien »

remove() will remove the node from the scene. If the scene is the only one who had a reference to the node then the node will also be deleted from memory. It's triangleselector is usually also removed automatically. But if the camera also has a reference to it then it will stay in memory until you replace that reference as well. I guess you mean ISceneNodeAnimatorCollisionResponse - so you can call setWorld(0) for that animator to reset it (or set it to another triangleselector).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
diho
Posts: 46
Joined: Fri May 20, 2011 9:01 pm
Location: Netherlands

Re: Unload terrainscenenode

Post by diho »

Thanks!
Post Reply