Skip to content

Rotated tiles have incorrect coordinates #198

Description

@zommerfelds

pytmx tries to be smart and "fix" Tiled's weird coordinate choices (rectangle origin is top-left, where tiles are bottom-left):

o.y -= o.height

However, this does not take into account that a tile can be rotated. In this case it breaks the position completely. To work around I had to add object.height to every tile position and subtract tile height for each tile collider shape.

It would be nice if pytmx would fix the coordinate taking into account rotation. This should be an easy fix and I can give it a shot if you are interested.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions