# Complex collision shape in tile sources

**URL:** <https://forum.defold.com/t/complex-collision-shape-in-tile-sources/2567>\
**Category:** Questions\
**Created:** [August 5, 2016, 2:29pm UTC](https://forum.defold.com/t/complex-collision-shape-in-tile-sources/2567 "2016-08-05T14:29:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spyromus](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/spyromus/32/1803_2.png) [@spyromus](https://forum.defold.com/u/spyromus)\
**Post date:** [August 5, 2016, 2:29pm UTC](https://forum.defold.com/t/complex-collision-shape-in-tile-sources/2567/1 "2016-08-05T14:29:43Z")

</div>

Hi guys and gals! I’m building a small road game and have tiles for crossings and other road sections. It seems I can’t have a complex shape (like a t-crossing, for example) for the collision even when providing exact mask image with transparent pixels for the road. Am I right? No matter what I try, I see the collision bounding box around the whole tile, not just the three areas around the road. Is it the limitation of Defold?

 ![](https://forum-defold.b-cdn.net/uploads/default/original/2X/4/44809f048621042c35588a2bd25045551747b628.png)

---

<div class="post-metadata">

**Author:** ![ArmandCloud](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/armandcloud/32/1638_2.png) [@ArmandCloud](https://forum.defold.com/u/ArmandCloud)\
**Post date:** [August 5, 2016, 3:01pm UTC](https://forum.defold.com/t/complex-collision-shape-in-tile-sources/2567/2 "2016-08-05T15:01:04Z")

</div>

Hello @spyromus ,

I experienced this one before, here my insights ;

Documentation says :

> The editor will automatically generate **a convex shape** around each tile, taking into account pixels that are not 100% transparent:

Here is what is [Convex wiki.](https://en.wikipedia.org/wiki/Convex_set)

A post about this situation.

> [@Does defold support only three shapes for collision? (SOLVED)](https://forum.defold.com/t/does-defold-support-only-three-shapes-for-collision-solved/1985/12):
>
> Hello @sicher I used that method. But i didn’t satisfied with the result. Maybe it works with little tiles, didn’t try it. [image] I think i will stick with default colliders for now. [image] Best Regards,

Here is how engine treated 2 different shapes with using shapes alpha.

 ![](https://forum-defold.b-cdn.net/uploads/default/original/2X/1/1952ad7071e38d96114cafcd1d24b78d063b7a04.png)

\*\* Concave Left , Convex right

Best Regards,

PS : if there is another info that i didn’t see yet, feel free to flag this post.

---

<div class="post-metadata">

**Author:** ![spyromus](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/spyromus/32/1803_2.png) [@spyromus](https://forum.defold.com/u/spyromus)\
**Post date:** [August 5, 2016, 7:01pm UTC](https://forum.defold.com/t/complex-collision-shape-in-tile-sources/2567/3 "2016-08-05T19:01:22Z")

</div>

Thanks for the details, mate. I don’t know but it looks like an easy to implement and super-powerful feature – custom polygon-based collision maps. Surprised it isn’t there. But anyway, I get the gist of it now, thanks.

I guess, I’ll be splitting my tiles in quarters to get to a single piece maps. If it doesn’t work, will start thinking further.

Cheers!
