Code: Select all
smgr->addCameraSceneNodeMaya();
smgr->getActiveCamera()->setPosition(vector3df(50,30,50));
IAnimatedMesh * mesh=smgr->getMesh("../storage/AquaBox/AquqBox.x");
smgr->getMeshManipulator()->setVertexColors( mesh->getMesh(0), video::SColor( 50, 50, 50, 50 ) );
ISceneNode *Aqua = smgr->addAnimatedMeshSceneNode(mesh);
Aqua->setMaterialFlag(EMF_LIGHTING, false);
Aqua->setAutomaticCulling(false);
Aqua->setMaterialFlag(EMF_BACK_FACE_CULLING, false);
Aqua->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA );
Aqua = smgr->addAnimatedMeshSceneNode(mesh);
Aqua->setMaterialFlag(EMF_LIGHTING, false);
Aqua->setAutomaticCulling(false);
Aqua->setMaterialFlag(EMF_BACK_FACE_CULLING, false);
Aqua->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA );
Aqua->setPosition(vector3df(10,10,10));
.....
while(...)
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->draw3DLine(vector3df(0,0,0), vector3df(100,0,0), SColor(255,255,0,0));
driver->draw3DLine(vector3df(0,0,0), vector3df(0,100,0), SColor(255,0,255,0));
driver->draw3DLine(vector3df(0,0,0), vector3df(0,0,100), SColor(255,0,0,255));
driver->draw3DLine(vector3df(0,0,0), vector3df(0,0,100), SColor(255,0,0,255));
driver->endScene();
}
But I do not understand, why point 0,0,0 (this centre?) move from one Mesh to second.
This occurs, when I rotate camera.
Tell me about this situation, please.