Getting smallest Bounding Box (MinimumAreaRectangle) problem

Hey. i wanna get the smallest enclosuring rectangle. Basically what i’m doing right now: getting each boundary, calculate the 2d-vertices A,B,C,D (also minding the rotation!) and add them to a array. Then feed that array of cvertices into a node called “MinimumAreaRectangle”. Here is the problem: it outputs the right x and y dimensions, but not the right centerpoint. (actually it outputs the average of all points)
if included some pics to better visualize the problem:

two boundaries with same size and no rotation: no problem
but if i add a 3rd one or change the size or rotation of one of the boundaries then fallowing happens:

somehow gets offset by a random value?

so is the algorithm broken?

you can see the blueprint graph here:
[link text][1]
in case youre wondering, how i calculate the rectangle vertices here
[link text][2]
(but shoudn’t be the problem, vertices are allright)

also another pic of the issue:

ah, and it shoudn’t be a relative / worldspace problem (since i placed my generating object at 0/0/0

You are correct that it is taking the average of all points when it should only be considering points that make up the convex hull. I would definitely submit a bug report, as I don’t see one currently on Unreal Issues. It should be a very simple fix.

In the meantime you can fix this in the C++ source for yourself if you are using it. It’s in KismetMathLibrary.cpp. If you are in blueprint only, you could write the algorithm yourself using the link below, although it will be pretty complex for BP. This is the same source that the Unreal implementation comes from, so be sure to correct its center as well.