# Using a DAE mesh for collision

**URL:** <https://forum.defold.com/t/using-a-dae-mesh-for-collision/69434>\
**Category:** The Defoldmine\
**Created:** [October 9, 2021, 3:54am UTC](https://forum.defold.com/t/using-a-dae-mesh-for-collision/69434 "2021-10-09T03:54:31Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![astrochili](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/astrochili/32/37266_2.png) [@astrochili](https://forum.defold.com/u/astrochili)\
**Post date:** [April 14, 2022, 7:37pm UTC](https://forum.defold.com/t/using-a-dae-mesh-for-collision/69434/5 "2022-04-14T19:37:30Z")

</div>

Since there is a [Sync Tool](https://forum.defold.com/t/building-a-sync-tool-for-blender-to-defold/69920), I would like to extend this script to generated convex shapes from buffer files. I don’t know if this should be an improvement of [dae2collision](https://github.com/JustAPotota/dae2collision), or an additional checkbox in the [sync tool](https://forum.defold.com/t/building-a-sync-tool-for-blender-to-defold/69920), but it would definitely be great.

I don’t know much about blender and python, so I would like to try to improve this script in Lua first. Can I just take the buffer geometry array and translate it straight into a convex shape, I won’t make a mistake here or will there be excess geometry?

The buffer of the box shape exported from Sync Tool looks like 12 triangles with 36 verticles:

```lua
{
    "name": "position",
    "type": "float32",
    "count": 3,
    "data": [
-96,0,-48,-96,0,48,-96,16,48,-96,0,-48,-96,16,48,-96,16,-48,96,16,48,-96,16,48,-96,0,48,96,16,48,-96,0,48,96,0,48,96,0,48,-96,0,48,-96,0,-48,96,0,48,-96,0,-48,96,0,-48,96,16,-48,-96,16,-48,-96,16,48,96,16,-48,-96,16,48,96,16,48,96,0,-48,-96,0,-48,-96,16,-48,96,0,-48,-96,16,-48,96,16,-48,96,16,-48,96,16,48,96,0,48,96,16,-48,96,0,48,96,0,-48
    ]
},

```

But the convex shape of the box looks like the 8 verticles. Do I really need for some converting here?

---

_[View the full topic](https://forum.defold.com/t/using-a-dae-mesh-for-collision/69434)._
