Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchor point for tile objects differs from shape objects #1579

Closed
nrj opened this issue May 25, 2017 · 1 comment
Closed

Anchor point for tile objects differs from shape objects #1579

nrj opened this issue May 25, 2017 · 1 comment

Comments

@nrj
Copy link

nrj commented May 25, 2017

This may be by design, but I didn't see it mentioned anywhere in the docs.

It appears that when inserting a Tile object it's anchor point differs from that of rectangles and ellipses. Please see the image below in which all objects are set to position 0, 0.

object-origins

As you can see the anchor point for tile objects is the bottom left, whereas every other object type is top left.

@bjorn
Copy link
Member

bjorn commented May 25, 2017

This is a duplicate of #91.

It is indeed an annoying inconsistency, and I'd like to fix it eventually but it'll require making the object origin configurable. There is another aspect to this which is that the origin of tile objects on isometric maps is the bottom-center rather than the bottom-left.

The documentation does mention it but it's a bit hidden, from the TMX Map Format page:

"When the object has a gid set, then it is represented by the image of the tile with that global ID. The image alignment currently depends on the map orientation. In orthogonal orientation it's aligned to the bottom-left while in isometric it's aligned to the bottom-center."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants