Strange behaviour with boundingbox

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
wts
Posts: 5
Joined: Thu Nov 12, 2009 8:04 am

Strange behaviour with boundingbox

Post by wts »

Hi,
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));
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

That was a bug which is now fixed in SVN and will be in one of the next versions (don't remember if 1.6.1 or 1.7)
Post Reply