X file bounding box bug
Posted: Mon Dec 18, 2006 2:53 pm
The X files I am exporting from MAX 7 are loading with a zero-sized bounding box. Really messes up the physics
This patch fixes it:
I don't see why you would want to reset the bounding box to zero size in the first place, but my X files now load correctly.
Incidentally, should I do anything else with this patch (like commit it)?
This patch fixes it:
Code: Select all
Index: source/Irrlicht/CXAnimationPlayer.cpp
===================================================================
--- source/Irrlicht/CXAnimationPlayer.cpp (revision 335)
+++ source/Irrlicht/CXAnimationPlayer.cpp (working copy)
@@ -801,9 +801,7 @@
core::vector3df p(0,0,0);
Joints[i].AnimatedMatrix.transformVect(p);
- if (first)
- Box.reset(p);
- else
+ // Bounding boxes can have zero size, since this code was resetting the existing box
Box.addInternalPoint(p);
first = false;
Incidentally, should I do anything else with this patch (like commit it)?