I have a scene with 3 entities. Each entity use the same animated mesh (extracted from ninja.b3d, irrlicht media folder). There is a big bug with the bounding boxes. Buffer bounding boxes are wrong, and so the object bounding box is wrong too.
I think this bug comes from the way animated meshes are handled : first they are animated correctly, and then the second pass render() the bounding boxes. But bboxes are updated in the wrong order.
I use only smgr->drawAll() for rendering, and setPosition/Rotation/Animation start, end and speed.
Here is a short (but heavy, 28 Mb compressed) video describing the bug: http://www.mediafire.com/download.php?qjz1zzej2mn
For me there is a workaround : I use the buffer bbox for unit selection, and I can recalculate every bbox before handling selection.
Code: Select all
irr::scene::IMesh* m = node->getMesh()->getMesh(node->getFrameNr());
for(unsigned int i = 0; i < m->getMeshBufferCount(); i++)
m->getMeshBuffer(i)->recalculateBoundingBox();