Download

Oriented bounding box from GetLocalBounds

Hello,

Rendering an (axis aligned) boundingbox using getcomponentbounds works nicely (below in green). To visualize my target-rectangle (red lines) I’m trying to get it a bit more tight by making an oriented boundingbox, using GetLocalBounds and rotating it (below in yellow).

However as is seen in the image, the yellow box doesn’t encompass the mesh, it is missing some offset. Any idea where to get that offset?


Figured out the box was off-center. Also figured out you can get the mesh from the meshcomponent and via that get to a bounds object. Came up with this in the meanwhile: