The problem is that the transformed bounding box from
getTransformedBoundingBox() is wrong when a scene node is rotated. It is very efficient compared with the correct method, but it is still wrong. I have commented on this many times.
http://irrlicht.sourceforge.net/phpBB2/ ... hp?p=94967
Here is an image that illustrates the different bounding boxes that you can get for a single rotated cube.The green one is axis aligned in object space, the red one is axis aligned in world space. The blue one is just wrong as it doesn't even enclose the entire object. Once you have the incorrectly transformed bounding box from
getTransformedBoundingBox(), there is no way to get something useful out of it without undoing the bad transform [which would be silly].
If you want the correct world space bounding box, try the following.
Code: Select all
core::aabbox3df box = Node->getBoundingBox();
Node->getAbsoluteTransformation().transformBoxEx(box);
If you just want to render the meshes bounding box, it is easier to use the debug mode flag as suggested by hybrid [assuming you want to use that color].
Travis