mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Status Bar pixel coord is rounded rather than floored for orthogonal maps #3833

howprice posted onGitHub

Describe the bug The integer pixel coordinates displayed in the Tiled status bar are incorrect for object layers. The numbers appear to be rounded to nearest rather than floored. This can lead to a lot of confusion when debugging placements by moving the mouse and looking at the coord.

To Reproduce

  1. New Map
  2. Orthogonal
  3. Place a tile at (0,0) in the default tile layer in which each pixel is obvious e.g. checkerboard pattern, zoom in on it.
  4. Add an Object Layer
  5. Select the object layer
  6. Select Select Objects (S)
  7. Move the mouse pointer around in the top left pixel. It can be seen that the Pixel Coord in the Status Bar changes from (0,0), (0,1), (1,0), and (1,1) depending on which quadrant of the pixel the mouse is pointing at.

Expected behavior In Step 7 above, the Pixel Coordinate in the Status bar should always read (0,0). It would make sense to floor the float/double pixel coord instead of rounding it in this case.

More discussion here: https://discord.com/channels/524610627545595904/524610627545595906/1164211436206182532

Media image

(Apologies that screen capture does not capture the pointer, so drawn in manually!)

Specifications:

  • OS: Windows 10
  • Tiled Version: 2023.08.03

Is this issue actually specific to orthogonal maps? Is it floored for hexagonal, etc maps? I suspect it's true for all map types, it's just that for non-staggered Isometric maps in particular, it's less relevant.

posted by eishiya over 1 year ago

Is this issue actually specific to orthogonal maps? Is it floored for hexagonal, etc maps? I suspect it's true for all map types, it's just that for non-staggered Isometric maps in particular, it's less relevant.

I only have experience with orthogonal maps I'm afraid. I'm not sure how any changes would affect other map types.

posted by howprice over 1 year ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests