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
Unload terrainscenenode
Re: Unload terrainscenenode
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Unload terrainscenenode
Thanks!