Convex Hull Generator Plugin

It’s a C++ plugin that will calculate a convex hull around selected actors with a tunable offset using the Graham Scan algorithm . It can also draw a spline mesh using tunable tileable static mesh around the calculated convex hull perimeter.

Setup

- Get the plugin from Epic’s marketplace, and install it.
- In your project go to Edit->Plugins, and check the “Convex Hull Generator” plugin.

Usage

- Right click on the folder where you want to have your convex hull actor, and select Blueprint Class.


- In Pick Parent Class window open ALL CLASSES and in the search for ConvexHullActor and select it to create a convex hull actor blueprint.



- Drag actor blueprint created to any map that you want to use convex hull. Select it, and then in the Details panel under the Convex Hull section configure the convex hull actor.


- While the convex hull actor blueprint is selected Under Convex Hull-> Actors, add elements for the actors and assign them to actors that you would like to have a convex hull around them.

If you move the actors afterwards, you can always hit the Update Debug button to update the convex hull debug.



- Convex hull offset from actors can be tuned via Offset From Actors variable.
- To draw a tileable spline mesh, you can enter the values for the static mesh, and then call DrawConvexHullMesh for that blueprint actor via blueprint event graph to draw the spline mesh for the convex hull perimeter.



The spline mesh will use the average height of the selector actors, that can be tuned by adjusting Spline Mesh Height Offset.

Alternatively, if you only care about the convex hull 2D calculation around some objects, you can just use the CalculateConvexHullPerimeter function straight from the c++ plugin. Pass the actors locations and set the extended offset, and get the calculated vertices of the convex hull.



Note: If you are planning to use this plugin on a packaged project, like any other UE5 project, your project needs to be C++ based project. You won’t be able to package this plugin on a blueprint only project.

Showcase



Sample project link

Fab Marketplace link

Contact

Support Email: tools@aotgame.com