# Collision editor - how to get collision shape in libgdx

**URL:** <https://discourse.mapeditor.org/t/collision-editor-how-to-get-collision-shape-in-libgdx/1894>\
**Category:** Questions\
**Created:** [December 18, 2016, 2:53pm UTC](https://discourse.mapeditor.org/t/collision-editor-how-to-get-collision-shape-in-libgdx/1894 "2016-12-18T14:53:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rognan](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@Rognan](https://discourse.mapeditor.org/u/Rognan)\
**Post date:** [December 18, 2016, 2:53pm UTC](https://discourse.mapeditor.org/t/collision-editor-how-to-get-collision-shape-in-libgdx/1894/1 "2016-12-18T14:53:46Z")

</div>

Hi,  
i am using libgdx and i can’t find a way how to get a shape i define in collision ediotr in Tiled. it should be somewhere under Tilesets/tileset/tile/ **“objectgroup/object(index)?”**

`<tileset firstgid="5" name="Environment" tilewidth="255" tileheight="241" tilecount="1" columns="0"> <tileoffset x="0" y="64"/> <tile id="0"> <image width="255" height="241" source="Pictures/Rock.png"/> <objectgroup draworder="index"> <object id="7" x="9" y="215"> <polygon points="0,0 36,72 96,90 196,67 252,-12 120,-38"/> </object> </objectgroup> </tile> </tileset>`

Is collision editor compatible with libgdx ? If it is not, i will use collision object layer but solving collision with this editor would be much better 🙂

Thanks for any answer

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [December 18, 2016, 8:24pm UTC](https://discourse.mapeditor.org/t/collision-editor-how-to-get-collision-shape-in-libgdx/1894/2 "2016-12-18T20:24:12Z")

</div>

Since you already found the information in the TMX file and you’re specifically interested how to get that information using libgdx, you may want to ask in the libgdx community instead. You could be lucky here, but I think you have better chances of getting an answer there.

---

<div class="post-metadata">

**Author:** ![Rognan](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@Rognan](https://discourse.mapeditor.org/u/Rognan)\
**Post date:** [December 19, 2016, 1:10pm UTC](https://discourse.mapeditor.org/t/collision-editor-how-to-get-collision-shape-in-libgdx/1894/3 "2016-12-19T13:10:20Z")

</div>

Thanks for tip bjorn.

Here is the topic with answer on libgdx forum if someone is intersted.

[http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=24867](http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=24867)
