Physics Body Editor for Defold (Polygon Editor)

[Deprecated] I’m not planning to update it.

I was in research for one of our game prototype which requires custom collision shapes. I came across the Physics Body Editor was originally developed by Aurelien Ribon. But its internal system was designed to use with libGDX. So I decided to make my own exporter for Defold build top on the editor.

This is the modified version of Physics Body Editor for Defold Game Engine compatibility. I made a lots of breaking changes, improvements, added new functionalities and bug fixes.

Download

More info and manual is available here:
https://selimanac.github.io/physics-body-editor/

P.s. I wish we will have rigid bodies in the editor someday. We can combine shapes and use them as dynamic bodies.

Features

  • Convex shape file generation
  • GameObject file generation
  • Pivot point
  • Grids and snap
  • Multiple shapes in same body

Tutorial video

Release Notes

1.5.0

  • All dependencies updated.
  • New dark theme GUI.
  • New coordinate system.
  • New zoom level and pivot(origin) functionallties.
  • Defold Exporter with .convexshapes and .go files.
  • Lots of major & minor bugs fixed.

Source code is available on Github

selimanac/physics-body-editor - GitHub

18 Likes

Ideally this is something that would be great to add as a builtin editor feature. To use sprites as references, and make physics shapes based on them that can then be used.

7 Likes

Something where you could start with a triangle then add and drag vertices over a sprite or model would be ideal for me. Less Atlas texture space and more fine tuned control.

Is there a way to use it for 3D? To make 3D convex shapes? If not maybe there is some other tool that can create 3D convex shapes?

Unfortunately this tool is deprecated and it was not suitable for 3D.
What do you want to achieve, what is your point of creating 3D convex shapes? I guess you can use blender for this?

but it seems to work, at least it can create 2D shapes, that I can set as collision shape in Defold :smiley:

I need to create collision shapes for a track in a 3D racing games (that’s the current use case, but I already were composing a lot of collision shapes out of primitive shapes for 3D games).

That’s interesting?

Ah, great :slight_smile: I mean I have no plans to improve it in the future.

Just guessing. But it might be possible. I believe at least someone wrote a python script for exporting

1 Like

https://forum.unity.com/threads/blender-to-unity-mesh-collider-help.501100/

1 Like

Aha: Custom 3D collision shape - #18 by Mathias_Westerdahl

3 Likes