"Get Component Bounds" not returning correct bounds on diagonally rotated mesh

I’m using UE4 4.26.1.

Hi! I’m having difficulty retrieving the exact bounds of a custom static mesh. As a demonstration, I’m rotating two objects diagonally. I using this logic draw the bounds:

In my game, I require the drawn debug box’s extent’s Y to be elongated to 1600 and the it’s rotation to be absolute:

On the left is my custom mesh and on the right is a generic box. As you can see, the bounds doesn’t quite match the custom mesh on the left, while the generic box mesh is shaped perfectly.

The collision for my custom mesh is very simple. I tried deleting that simple sphere collider, but that didn’t make a difference.


I’ve tried using “Get Local Bounds” and it seems to return a better representation of the bounds of my custom mesh:

However, since I’m required to elongate the debug box’s Y axis and lock the rotation, I’m struggling getting the the drawn bounds rotated correctly.


What can I do here? Let me know if you require any additional information.

** Bump **…

Interested to know also how others have solved this. Normally when I run up against things like this, I usually just look for a quick way out or workaround, as searching the Docs / YT-tuts takes too long. Think solutions like spawning a hidden temp mesh that’s oriented in the simplest way, to get the required bounds.

But actually this is a poor solution anyway. Instead, its often better to just write a quick BP script to do TRACES around the mesh, getting the actual per-poly hits, and storing those as maximum bounds, as that’s far more accurate and a lot more useful in practice, especially on irregular shaped meshes! :wink: