Bound Extents of Sphere Change

I have a spherical mesh with simplified spherical collision and I am using GetComponentsBoundingBox to get the bounds of the object then using GetExtent to find the radius of the bounds, which in theory for a spherical object should not change during rotation.

However, upon rotating the mesh the radius of the bounds can change drastically, is this expected? How can I avoid this?


Hi Maddius,

What you are seeing is the extent of the bounds box. As the sphere turns it is catching the corners of the bounds box, which leads to the variation in numbers. If you get the sphere radius instead of get extent it should help with this.

Thanks for the reply! I can confirm that GetRootPrimitiveComponent()->Bounds.GetSphere() provides a consistent radius regardless of transformation as desired, however I still don’t think it makes sense for the length of the extents of a bounding box to change during rotation for a sphere, I have attached an image of how I think of this, but perhaps UE4 is doing something different?

I would expect the length of the red line to always be the same, however it seems like this is not the case.


If the mesh wasn’t a sphere and UE4 used AABB instead of OOB then I would understand why this happens, however I would have though that this distance would always be the same for both AABB and OOB when we are talking about containing a sphere?

The reason this is occurring, however, is that the bounds check line technically doesn’t move. It will always point in the same direction because the “up” or “right” never technically changes, only the rotation of the static mesh does. So it is always pointing in the same direction as the box moves through it.

Hi Maddius,

We have not heard from you in quite some time. I am marking this question as answered for tracking purposes. Thank you!