Hey, Im trying to use Box3 on a rotated model. The result I get is wrong.
I guess the images demonstrate the problem pretty good. All objects are rotated around the y axis.
What I dont understand is why the boundingbox is not “touching” the geometry anymore? I know the boundingbox is axis aligned and increases volume when rotated, but it should fit the object exactly, shouldnt it? Is this intentionally?
Here is the object with rotation = 0 and rotation = .7. (Boundingbox on each nested object)
bounding boxes are non inclusive of the rotation of objects and will always return the min and max dimensions of a given object, you will find the OBB class is what you’ll need to use for your case as it returns an oriented bounding box relative to the updated matrix of an object, I hope this helps.
Hey thanks for your reply. Can you explain what you said? As mentioned boundingboxes are axes aligned, but they still take rotation into account, as seen in img2, where the rotated cuboid is framed exactly inside of the boundingbox. On the other hand my model is not framed exactly, au contraire the boundingbox is actually way bigger than the model.
Here I painted the desired boundingbox in red. The yellow boundingboxes are calculated via Box3
I wonder, is this something exceptional? Doesnt look like a big deal to me at first. I checked the model in blender and tested it in two projects. Cant really figure out whats happening