Physics Tools - generate convex shapes and concave silhouette chains of boxes

logo

Hey everyone!

I’m excited to share a set of editor scripts to generate Defold physics shapes for 2D physics from images..

Convex Shape Generator

This tool computes a convex hull of all non-transparent pixels.

Silhouette Chain Generator (Concave Walls)

Since Box2D doesn’t natively support concave polygons for dynamic physics, this tool solves that by creating a chain of thin boxes that trace the silhouette of your image.

The extension uses a command-line tool written in Zig to process the images and includes pre-compiled binaries for Windows, macOS (Intel/Silicon), and Linux, so it just works everywhere.

Available at → GitHub - indiesoftby/defold-physics-tools: Stuff to help with 2D physics in the Defold game engine

Feel free to try it out and let me know if you have any feedback or feature requests!

Happy Defolding! :shooting_star:

21 Likes