aida
15-08-2007 15:53:24
Hi,
I've exported a mesh from 3DSMAx with ofusion. It's a character.
I loaded the scene thanks to OSMScene. I want to attach the node of my newly loaded character to another node in my scene. To do that, I remove the node from its parent and reattach it. No error is launched, but I can't see my character anymore.
Here is the code :
I tried to set visibility to true, scale the node to make it huge, set its position clearly, but the guy remains invisible.
Is there something more to do to re-attach a node to another one?
I wonder if it comes from the exported mesh.
Please help, any idea is welcome!
I've exported a mesh from 3DSMAx with ofusion. It's a character.
I loaded the scene thanks to OSMScene. I want to attach the node of my newly loaded character to another node in my scene. To do that, I remove the node from its parent and reattach it. No error is launched, but I can't see my character anymore.
Here is the code :
OSMScene oScene(pSceneManager,pRenderWindow);
oScene.initialise("characterAnimation.osm");
oScene.createScene(pSceneManager->getRootSceneNode());
OSMScene::EntityList entList = oScene.getEntityList();
Entity * character = entList[0];
SceneNode * charNode = pSceneManager->getSceneNode(character->getName());
SceneNode * OldParent = charNode->getParentSceneNode();
OldParent->removeChild(charNode);
SceneNode *viewNode = pSceneManager->getRootSceneNode()->createChildSceneNode("ViewNode");
viewNode->addChild(charNode);
I tried to set visibility to true, scale the node to make it huge, set its position clearly, but the guy remains invisible.
Is there something more to do to re-attach a node to another one?
I wonder if it comes from the exported mesh.
Please help, any idea is welcome!