I've a problem visualizing bbox of 2 nodes using the same mesh (.x)
I load 1 mesh (dwarf.x), create 2 nodes and stop the animation of the first.
When I draw the scene the BBox of the stoped node follows animated node and
the BBox of the animated node is fixed.
Using .x and .b3d meshes the behaviour is the same,
with .md2 everything works well.
This is the code:
Code: Select all
IAnimatedMesh* mesh = smgr->getMesh("../../media/dwarf.x");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
node->setPosition(vector3df(-30,0,0));
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMaterialTexture( 0, driver->getTexture("../../media/dwarf.jpg") );
node->setAnimationSpeed(0);
}
IAnimatedMeshSceneNode* node2 = smgr->addAnimatedMeshSceneNode( mesh );
if (node2)
{
node2->setPosition(vector3df(20,0,0));
node2->setMaterialFlag(EMF_LIGHTING, false);
node2->setMaterialTexture(0, driver->getTexture("../../media/dwarf.jpg") );
node2->setFrameLoop(0,100);
}
node->setDebugDataVisible(irr::scene::EDS_BBOX);
node2->setDebugDataVisible(irr::scene::EDS_BBOX);
smgr->addCameraSceneNode(0, vector3df(0,100,-100), vector3df(0,5,0));