### Search in Sort by:

 Everything Blueprint Scripting Current Space

### Search help

• Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
• You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
• cat dog --matches anything with cat,dog or both
• cat +dog --searches for cat +dog where dog is a mandatory term
• cat -dog -- searches for cat excluding any result containing dog
• [cats] —will restrict your search to results with topic named "cats"
• [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

# Getting smallest Bounding Box (MinimumAreaRectangle) problem

 0 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? Product Version: UE 4.21 Tags: highresscreenshot00002.png (19.3 kB) highresscreenshot00006.png (29.3 kB) highresscreenshot00003.png (19.6 kB) highresscreenshot00004.png (31.4 kB) highresscreenshot00005.png (33.5 kB) more ▼ asked Feb 06 '19 at 05:00 PM in Blueprint Scripting schauk 31 ● 2 ● 3 ● 11 schauk Feb 06 '19 at 05:06 PM you can see the blueprint graph here: link text in case youre wondering, how i calculate the rectangle vertices here link text (but shoudn't be the problem, vertices are allright) also another pic of the issue: highresscreenshot00007.png (20.7 kB) schauk Feb 06 '19 at 05:16 PM ah, and it shoudn't be a relative / worldspace problem (since i placed my generating object at 0/0/0 add new comment (comments are locked) 10|2000 characters needed characters left ▼ Viewable by all users

1 answer: sort voted first
 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. more ▼ answered Feb 06 '19 at 06:11 PM dachora1 274 ● 4 ● 9 ● 12 add new comment (comments are locked) 10|2000 characters needed characters left ▼ Viewable by all users