reattach node makes it invisible

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 :

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!

Lioric

16-08-2007 01:31:28

Is the character visible when you dont modify the original parent node?

aida

20-08-2007 10:29:20

Yes, the character is visible when I don't change the parent scene node. But everything I attach to the new parent node is visible.