Emptying a model from a Scene Node

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
iamtehpwn
Posts: 30
Joined: Sat Mar 31, 2007 6:11 pm

Emptying a model from a Scene Node

Post by iamtehpwn »

Suppose After combat, the enemy dies. In order to make it disappear, You'd usually use node->remove();

However, suppose I don't want to remove that node, I just want to clear the model that it has loaded out of memory, so that I can reuse that variable again to load a new model.

So put simple, I want to make the model disappear, without getting rid of the node variable itself. Is this possible, and if so, whats the best way to go about it?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

if you want to keep the model use node->setVisible(false)...
but if you want to delete the node (like you sayed) just use node->remove() (like you sayed), the variable still exists then and you can reuse it to load another one... ;)
node->remove has no affect at the variable itself !!!
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
iamtehpwn
Posts: 30
Joined: Sat Mar 31, 2007 6:11 pm

Post by iamtehpwn »

Thank you.
Post Reply