I have a question regarding the bounding box of models/primitives.
I am working with cylinders as dummies and as soon as i rotate them, the bounding box seems to get to big.See attached images.
The cylinders on the top are not rotated, the cylinders on the bottom are rotated by 45 degrees. I attached a box to visualize the rotation, the bounding box is exactly the same without the box.
Screenshot from playmode with bounding box visualized:
Can you share the project? I want to check object setup.
Edit: Nevermind, I see the box was for extra visualisation. That looks like it could be a bug in the engine code If you can post a bug report here, that would be great: https://github.com/playcanvas/engine/issues
Bear in mind that they are Axis Aligned Bounding Boxes if that makes a difference.
I think the engine stores AABB in local space for your mesh and that is tight. Then the matrix is applied to transform it to another AABB in world space, and that depending on rotation angle makes it larger. It’s not ideal, but that’s the current implementation, and not a bug. The cost to keep them tight might be not worth it considering they’re used for frustum culling.