Centered object anchor points
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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