0

I've created an IAnimatedMeshSceneNode in Irrlicht, i set null pointer when creating it from the addAnimatedMeshSceneNode function of the scene manager.

As desired, the animated mesh is created successfully. When I change the parent of this animated node using the function setParent(ISceneNode* parent), it work when the parent is pointing on an existing node.

But when I set the SceneManager pointer as parent of the animated node again or if I set null parent to it, the application crash and I know the execution throws error on the setParent(mySceneManager).

How can I set the root node (sceneManager) as parent when my animated node has already been created?

Irrmich
  • 436
  • 4
  • 15

1 Answers1

1

You can set the Parent of an IAnimatedMeshSceneNode like this:

        node->setParent(smgr->getRootSceneNode());

In this case node the the IAnimatedMeshSceneNode and smgr is my ISceneManager.

:)

Roodee
  • 71
  • 2
  • You make me avoid the task consisting on reloading the entire node each time i need to restore the root parent. +1 – Irrmich Dec 29 '15 at 03:51