Code: Select all
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMaterialTexture( 0, driver->getTexture("f:/qsoccker/data/meshes/outfieldplayer.png") );
IAnimatedMesh* meshGlasses = smgr->getMesh("f:/qsoccker/data/meshes/glasses-2.ms3d");
ISceneNode* nodeGlasses = smgr->addAnimatedMeshSceneNode(meshGlasses);
nodeGlasses->setMaterialFlag(EMF_LIGHTING, true);
nodeGlasses->setMaterialFlag(EMF_FOG_ENABLE, true);
nodeGlasses->setRotation(vector3df(0, -90 + 180, -90));
nodeGlasses->setPosition(vector3df(-21 + 21, 0, 0)); //y: 0
ISceneNode* playerHead = node->getJointNode("Bip01 HeadNub");
playerHead->addChild(nodeGlasses); //*-/
}
......
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
screenshot1 by david.wan, on Flickr
screenshot2 by david.wan, on Flickr
screenshot3 by david.wan, on Flickr
screenshot4 by david.wan, on Flickr
As you can see, The screen1 & screen2 group are not identical with the screen3 & screen4 group. Is there something I'm wrong with this? I'm running this with irrlicht 1.7.2, windows xp, vc2008.