flame-engine / flame-engine/flame
Isometric tiled map places tiles at incorrect location
- Dominant language
- Dart
- Stars
- 10.8k
- Forks
- 1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 21
Description
### What happened?
I have this builded in Tiled, as you can see
I use this pack to learn Flame & Tiled
https://rvros.itch.io/isometric-village
The bridge is an object, the 2 ground tiles are tiles.
I have 2 layers
- Tiled layer (2 ground tiles)
- Object layer (1 bridge)
And these are the dimensions of the tiles & grid
Each ground tile size is 370px by 328px (Except props)
Please setup your grid tile size to 320px by 160px for best results.
For some reason this is how flame renders it like this (with 50 pixels on the x axis incorrect)
Is it coincidence that the 50 pixels is 370 - 320? Or am I looking at the wrong direction?
I render the Object layer myself (because I can't find a way to let flame_tiled do that for me)
I use this function to convert the position of an object to the isometric point
```
static Vector2 toIsometric(Vector2 position) => Vector2(
((position.x - position.y) + (mapWidth / 2)),
((position.x + position.y) / 2),
);
```
### What do you expect?
I would expect that the rendering of the objects/ground tiles match exactly what is happening in Tiled
### How can we reproduce this?
_No response_
### What steps should take to fix this?
_No response_
### Do have an example of where the bug occurs?
_No response_
### Relevant log output
```shell
```
### Execute in a terminal and put output into the code block below
_No response_
### Affected platforms
All
### Other information
_No response_
### Are you interested in working on a PR for this?
- [ ] I want to work on this
Contributor guide
Assessment
This issue has not been assessed yet.