# Support for more than 16 shapes in a collision object

**URL:** <https://forum.defold.com/t/support-for-more-than-16-shapes-in-a-collision-object/65471>\
**Category:** Feature requests (USE GITHUB)\
**Created:** [June 6, 2020, 11:45am UTC](https://forum.defold.com/t/support-for-more-than-16-shapes-in-a-collision-object/65471 "2020-06-06T11:45:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![totebo](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/totebo/32/36087_2.png) [@totebo](https://forum.defold.com/u/totebo)\
**Post date:** [June 6, 2020, 11:45am UTC](https://forum.defold.com/t/support-for-more-than-16-shapes-in-a-collision-object/65471/1 "2020-06-06T11:45:59Z")

</div>

```
WARNING:GAMESYS: Too many shapes in collision object. Up to 16 is supported (18). Discarding overflowing shapes.

```

 ![32](https://forum-defold.b-cdn.net/uploads/default/original/3X/6/a/6a00abcf98d87e6e017af3875f1ce1cbfd11b944.png)

See above. 18 collisions shapes are hardly excessive. Could this limit be configurable in game.project file?

---

<div class="post-metadata">

**Author:** ![Daniel\_Widgren](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/daniel_widgren/32/20551_2.png) [@Daniel\_Widgren](https://forum.defold.com/u/Daniel_Widgren)\
**Post date:** [June 6, 2020, 12:29pm UTC](https://forum.defold.com/t/support-for-more-than-16-shapes-in-a-collision-object/65471/2 "2020-06-06T12:29:06Z")

</div>

Maybe you could use tilesource for this and add collision there?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [June 6, 2020, 12:52pm UTC](https://forum.defold.com/t/support-for-more-than-16-shapes-in-a-collision-object/65471/3 "2020-06-06T12:52:24Z")

</div>

> [@totebo](#):
>
> Could this limit be configurable in game.project file?

Probably! Let’s have a look:

The error originates from this line of code:

> <https://github.com/defold/defold/blob/1.2.169/engine/gamesys/src/gamesys/resources/res_collision_object.cpp#L194>

Ok, so it uses the `COLLISION_OBJECT_MAX_SHAPES` constant. Where is it? Ah, here we go:

> <https://github.com/defold/defold/blob/1.2.169/engine/gamesys/src/gamesys/resources/res_collision_object.h#L16>

So, in theory we should expose that value all the way from the game project config. The values are read here:

> <https://github.com/defold/defold/blob/1.2.169/engine/engine/src/engine.cpp#L853>

---

<div class="post-metadata">

**Author:** ![totebo](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/totebo/32/36087_2.png) [@totebo](https://forum.defold.com/u/totebo)\
**Post date:** [June 6, 2020, 12:56pm UTC](https://forum.defold.com/t/support-for-more-than-16-shapes-in-a-collision-object/65471/4 "2020-06-06T12:56:17Z")

</div>

> [@britzl](#):
>
> Probably! Let’s have a look

Ha ha ha, you’re loving this new freedom Björn!

> [@britzl](#):
>
> So, in theory we should expose that value all the way from the game project config.

This is pretty amazing. Great to look at the exposed inner workings of Defold. I won’t be able to make this change myself, but hope someone might!
