Hello,
How do I remove or delete a scene node?
I have tried, like this:
IBillboardSceneNode* bill = (IBillboardSceneNode*)smgr->getSceneNode(objectId);
if(bill)
{
bill->drop();
}
and it results in the program crashing at smgr->drawAll;
(objectId is valid...I checked)
Thanks,
Brian
Deleting or Removing a Scene Node???
-
- Posts: 45
- Joined: Wed Oct 29, 2008 6:03 pm
Thank You! That works perfectly. I didn't even realize there was a remove.
Best Regards,
Brian
[quote="slavik262"]That's because bill's parent isn't aware it's been drop. The proper way to do this is with bill->remove. It decouples the scene node with its parent. When the parent drops it, it gets deleted (unless you have grabbed it).[/quote]
Best Regards,
Brian
[quote="slavik262"]That's because bill's parent isn't aware it's been drop. The proper way to do this is with bill->remove. It decouples the scene node with its parent. When the parent drops it, it gets deleted (unless you have grabbed it).[/quote]