mapeditor / mapeditor/tiled

Centered object anchor points

Open
#560 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
12.9k
Forks
2k
Avg merge
4h 27m
Merged PRs (30d)
8

Description

Currently, when an Object such as an ellipse or square are rotated, the position gets affected because Tiled sets the anchor point of the object to one of the corners instead of the center. It would be very useful to be able to set the anchor point of these objects to the center (I would even argue this should be the default, at least for circles and squares). That way, you can place an object on a grid point and rotate it without the position being affected. For example, I want to place a "crate" (square) placeholder object at grid point 16,12, then rotate it 45 degrees. When I read the .tmx file, the position should still be at 16,12 (currently that is not the case).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names ellipse and square objects and .tmx output, but no source file or test. Start by locating the object rotation, position, and serialization paths, then verify that a centered anchor preserves the grid position after rotation and is represented correctly in the resulting .tmx file.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, game-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.