Convex Hull Generator For Unity

I had the need for a simple script that i can feed with the vertices from a existing mesh and generete a convex collider-mesh out of it for Unity. So i found this realy nice C# implementation 1 2 from Matt Campbell of a fast algorithm called QuickHull 3 and could it implement it very easy into my Unity project.

The result of this was a nice little script component you can attach to any game object and it will generate a mesh collider from it and add it to the gameobject or any other target gameobject.

You can also use the ConvexHull.Generate() function from the Ux namespace

Download the .zip archive

The archive contains a folder ConvexHull wich you can place anywhere into your Unity-Assets folder. Then you can add the ConvexHullColliderGenerator component to your object.


  1. https://github.com/DesignEngrLab/MIConvexHull ↩︎

  2. https://designengrlab.github.io/MIConvexHull/ ↩︎

  3. https://de.wikipedia.org/wiki/QuickHull ↩︎