I've been the whole day fighting with a strange bug in my engine, and after hours of debugging it's due an -extrange, dunno if intended- Ogre behaviour.
The fact is that if you follow the next steps, you'll get a visible scene node even if it's not in the scene graph:
Code: Select all
Ogre::Entity* e = mSceneMgr->createEntity("Test", Ogre::SceneManager::PT_SPHERE);
Ogre::SceneNode* sn = mSceneMgr->createSceneNode(); // Note that this node doesn't belong to the scene graph, it's just an unattached node
sn->attachObject(e);
sn->attachChild(...)
sn->setPosition(4,0,0);
sn->_update(true,false); // !!!
My intention by calling _update(...) is to update the children global transforms in order to use them for some calcs.
Am I skipping something? Is this the expected behaviour? Because it looks a bad one to me.
Xavier