# Physics Body Editor for Defold (Polygon Editor)

**URL:** <https://forum.defold.com/t/physics-body-editor-for-defold-polygon-editor/63705>\
**Category:** The Defoldmine\
**Created:** [October 22, 2019, 9:07am UTC](https://forum.defold.com/t/physics-body-editor-for-defold-polygon-editor/63705 "2019-10-22T09:07:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [October 22, 2019, 9:07am UTC](https://forum.defold.com/t/physics-body-editor-for-defold-polygon-editor/63705/1 "2019-10-22T09:07:58Z")

</div>

![Physics Body Editor](https://selimanac.github.io/physics-body-editor/img/git_header.png)

# [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](http://www.aurelienribon.com/). 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/](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

[![](https://img.youtube.com/vi/-L3_OLw9zbg/maxresdefault.jpg "Physics Body Editor for Defold Game Engine [Tutorial]") ](https://www.youtube.com/watch?v=-L3_OLw9zbg)

### 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](https://github.com/selimanac/physics-body-editor)

[![selimanac/physics-body-editor - GitHub](https://gh-card.dev/repos/selimanac/physics-body-editor.svg)](https://github.com/selimanac/physics-body-editor)

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [November 20, 2020, 6:20am UTC](https://forum.defold.com/t/physics-body-editor-for-defold-polygon-editor/63705/2 "2020-11-20T06:20:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Epitaph64](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/epitaph64/32/39288_2.png) [@Epitaph64](https://forum.defold.com/u/Epitaph64)\
**Post date:** [November 21, 2020, 6:09pm UTC](https://forum.defold.com/t/physics-body-editor-for-defold-polygon-editor/63705/3 "2020-11-21T18:09:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Pawel](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pawel/32/24623_2.png) [@Pawel](https://forum.defold.com/u/Pawel)\
**Post date:** [April 16, 2024, 10:54am UTC](https://forum.defold.com/t/physics-body-editor-for-defold-polygon-editor/63705/4 "2024-04-16T10:54:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [April 16, 2024, 10:58am UTC](https://forum.defold.com/t/physics-body-editor-for-defold-polygon-editor/63705/5 "2024-04-16T10:58:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Pawel](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pawel/32/24623_2.png) [@Pawel](https://forum.defold.com/u/Pawel)\
**Post date:** [April 16, 2024, 11:04am UTC](https://forum.defold.com/t/physics-body-editor-for-defold-polygon-editor/63705/6 "2024-04-16T11:04:19Z")

</div>

> [@selimanac](#):
>
> Unfortunately this tool is deprecate

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

 ![image](https://forum-defold.b-cdn.net/uploads/default/original/3X/c/4/c47465bd3009a3a7868f580e5860035e5dc07efd.jpeg)

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).

 ![image](https://forum-defold.b-cdn.net/uploads/default/original/3X/1/d/1d6bfc6b06c2462ba94a57919537b5e2b156a14e.jpeg)

> [@selimanac](#):
>
> I guess you can use blender for this?

That’s interesting?

---

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [April 16, 2024, 11:08am UTC](https://forum.defold.com/t/physics-body-editor-for-defold-polygon-editor/63705/7 "2024-04-16T11:08:55Z")

</div>

> [@Pawel](#):
>
> but it seems to work, at least it can create 2D shapes, that I can set as collision shape in Defold

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

> [@Pawel](#):
>
> That’s interesting?

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

---

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [April 16, 2024, 11:10am UTC](https://forum.defold.com/t/physics-body-editor-for-defold-polygon-editor/63705/8 "2024-04-16T11:10:38Z")

</div>

> [@Pawel](#):
>
> That’s interesting?

> **[Blender to Unity mesh collider help](https://discussions.unity.com/t/blender-to-unity-mesh-collider-help/680459)**
>
> Hi there, my name is Gilan and i’m pretty new to importing things from blender → Unity. I’ve 1 question: How can i get a good mesh collider or edit it / make my own collider in blender (Look at screenshot). Thanks!

> <https://blender.stackexchange.com/questions/121778/convex-hull-as-mesh>

---

<div class="post-metadata">

**Author:** ![selimanac](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/selimanac/32/6397_2.png) [@selimanac](https://forum.defold.com/u/selimanac)\
**Post date:** [April 16, 2024, 11:16am UTC](https://forum.defold.com/t/physics-body-editor-for-defold-polygon-editor/63705/9 "2024-04-16T11:16:47Z")

</div>

Aha: [Custom 3D collision shape - #18 by Mathias\_Westerdahl](https://forum.defold.com/t/custom-3d-collision-shape/12505/18)

> [@Mesh Component](https://forum.defold.com/t/mesh-component/65137):
>
> In this latest beta, we’ve added a quite exciting feature: the Mesh Component Although the feature isn’t 100% done, we believe it’s still usable in its current form. And we’d love to hear your feedback to this feature. For instance, we lack proper documentation for this feature (but ofc that will come soon too). So, currently, this test project will have to serve as a starting/learning point for those interested. What does it do then, you ask? Mesh This component displays a single mesh. T…
