I must apologize if it is a newbie problem but I can't solve this.
I have been add IAnimatedMeshSceneNode, it is a soldier model, and then add one sceneNode it is a shadow plane and set the shadow position to position at soldier foot but the result after run program it is disappear but if I didn't set it position it is appear but not at my soldier foot.
How can I set its position.
Another one is sword, I get ISceneNode* from getXJointNode("joint_name") for attach sword model to be its child and after I set its(sword) position and rotation to match the position and rotation of hand joint, it is disappear too.
Please help, thank you very much.
ploblem after I set chaild Node and set transformation
IAnimatedMeshSceneNode* soldierNode = smgr->addAnimatedMeshSceneNode(smgr->getMesh("soldier.X"));
IAnimatedMeshSceneNode* shadowNode = smgr->addAnimatedMeshSceneNode(smgr->getMesh("shadow.X"), soldierNode, 1, core::vector3df(soldierNode->getPosition().X,soldierNode->getPosition().Y - 8,soldierNode->getPosition().Z));
IAnimatedMeshSceneNode* shadowNode = smgr->addAnimatedMeshSceneNode(smgr->getMesh("shadow.X"), soldierNode, 1, core::vector3df(soldierNode->getPosition().X,soldierNode->getPosition().Y - 8,soldierNode->getPosition().Z));
Childnodes are relative to the position of theire parents. It looks like you make shadowNode a child of soldierNode and then you add the position of soldierNode once more. If you set it to (0,0,0) it would already be at the position of the soldierNode. In your case you might want to use vector3df(0, -8, 0). Not sure if this really is your problem, but it looks a little bit like that could be it.