I followed the tutorial here to generate box2d bodies from a tiled map and that worked fine.... for orthogonal tiled maps. Unfortunately isometric maps use their own coordinate system where (0, 0) is at the leftmost corner of the map, and this causes the bodies to be in the wrong place.

I tried implementing a transformation matrix or just transforming the body but I don't think that is possible (or at least I could never find a way). How else can this be solved? Here is the relevant method that needs to be changed:

private Shape getPolygon(PolygonMapObject polygonObject) {
    PolygonShape polygon = new PolygonShape();

    float[] vertices = polygonObject.getPolygon().getTransformedVertices();

    float[] worldVertices = new float[vertices.length];

    for (int i = 0; i < vertices.length; ++i) {
        worldVertices[i] = vertices[i] / units;

    return polygon;

As you can see I need a way to convert the isometric coordinates to game coordinates using just plain math or something else like a matrix. I think the only line needing to be changed is the line in the for loop.

  • \$\begingroup\$ did you ever solve it? I'm having the same issue \$\endgroup\$
    – Lior Iluz
    Commented Apr 27, 2016 at 10:12
  • \$\begingroup\$ Did you ever end up fixing this? \$\endgroup\$ Commented Apr 6, 2017 at 6:28
  • \$\begingroup\$ Yes I did end up solving I think. I can't remember how because I ended up converting my app to 3D because it made things much easier, but I will look through my old code and see if I can find the solution \$\endgroup\$ Commented Apr 7, 2017 at 17:01

1 Answer 1


I had the same question that I have been able to answer here Box2d collision on isometric maps built in Tiled

Get the vertices out of the polygon and transform them from orthographic space to isometric with code like this.

public static Vector2 TwoDToIso(Vector2 point){
   Vector2 vel2 = new Vector2();

   vel2.x = point.x - point.y;
   vel2.y = -(point.x + point.y) / 2;
   return vel2;

I had to minus the y value in my example because my object was flipped incorrectly.

I hope this helps


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .