Get size of a static mesh, independent from rotation

I have a square cube (a wall)… I’m trying to find the size of the wall (or for more complex meshes, the size of the bounding box) in order to spawn points on the wall.

Using GetComponentBounds I can get the half-length in each direction, however these mesaurements return inconsistent values as soo as I rotate my wall.

So is there a way to get a consistent size of the mesh?

Okay, if someone else stumbles upon the same problem: I was trying to get the bounds from my static mesh component directly… this gives weird results when rotation the actor that owns the static mesh component.

Solution: Fron the static mesh component get the static mesh and get the bounds from the static mesh (not the component). I then multiply it with the relative scale 3d of the static mesh component (you can skip this if your mesh is unscaled).


thanks for the info,really helped.

Thanks that was really helpful. :slight_smile:

Also here: thanks for providing the answer, really helped me out!