Collision editor - how to get collision shape in libgdx

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 :slight_smile:

Thanks for any answer

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.

Thanks for tip bjorn.

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

1 Like