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

Inconsistent coordinates of rectangles #1697

Closed
issy123 opened this issue Aug 22, 2017 · 1 comment
Closed

Inconsistent coordinates of rectangles #1697

issy123 opened this issue Aug 22, 2017 · 1 comment

Comments

@issy123
Copy link

issy123 commented Aug 22, 2017

I thought I have written a bug with rectangles always being off by it's width & height.
But found out that the coordinates are inconsistent.

How the issue can be reproduced

Here are the map properties

image

Here is the rectangle cord:
image
Here is the tile cord:
image

what happens

As you could see both tiles are touching the top of the map, but the rectangle has a cord of y:64, but the tile has a cord of y:0. The rectangle does not respect the tile render order of 'Left, Down'.

What behavior I expect instead

I expect both the rectangle and tile respect the render order and start at y:0 if the tile is at the top, or x:0 if the tile is at the most left

details

Ubuntu 64 bit 16.04.2
tiled version 2017.07.12 (ubuntu has an outdated version of 0.14 so i installed tiled-daily)

@issy123 issy123 changed the title Inconsistent coordinates (tile & rectangle) Inconsistent coordinates of rectangles Aug 22, 2017
@bjorn
Copy link
Member

bjorn commented Sep 13, 2017

I expect both the rectangle and tile respect the render order and start at y:0 if the tile is at the top, or x:0 if the tile is at the most left

I'm sorry for the confusion caused! I would expect the same thing, but unfortunately it's not how it works in Tiled. And it will be tricky to change this without breaking backwards compatibility, since this inconsistency has existed ever since tile objects were introduced:

  • Rectangle and ellipse objects have top-left origin.
  • Tile objects have bottom-left origin (or, on isometric maps, bottom-center origin).

The solution is probably going to involve implementing configurable object anchor points (#560).

Closing this as duplicate of #91.

@bjorn bjorn closed this as completed Sep 13, 2017
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