Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

There is a problem in TileMap module #2517

Open
Y-way opened this issue Oct 16, 2019 · 1 comment
Open

There is a problem in TileMap module #2517

Y-way opened this issue Oct 16, 2019 · 1 comment

Comments

@Y-way
Copy link
Contributor

Y-way commented Oct 16, 2019

The renderer could not properly display tiles that are flipped and rotated.

https://github.com/urho3d/Urho3D/blob/68635536db18277495f0bc27fdfcd19b24fb7261/Source/Urho3D/Urho2D/TileMapLayer2D.cpp#L360
https://github.com/urho3d/Urho3D/blob/68635536db18277495f0bc27fdfcd19b24fb7261/Source/Urho3D/Urho2D/TileMapLayer2D.cpp#L389
If the tile-block set swapxy true, StaticSprite2D maybe render incorrectness.
https://github.com/urho3d/Urho3D/blob/68635536db18277495f0bc27fdfcd19b24fb7261/Source/Urho3D/Urho2D/StaticSprite2D.cpp#L295-L337

TMX-Map format tile-flipping
"When rendering a tile, the order of operation matters. The diagonal flip (x/y axis swap) is done first, followed by the horizontal and vertical flips."

map1
The left is correct!

TileMapTest.zip

Y-way added a commit to Y-way/Urho3D that referenced this issue Oct 16, 2019
The renderer could not properly display tiles that are flipped and rotated.
[urho3d#2517](urho3d#2517)
Y-way added a commit to Y-way/Urho3D that referenced this issue Oct 23, 2019
The renderer could not properly display tiles that are flipped and rotated.
[urho3d#2517](urho3d#2517)
Y-way added a commit to Y-way/Urho3D that referenced this issue Oct 23, 2019
The renderer could not properly display tiles that are flipped and rotated.
[urho3d#2517](urho3d#2517)
@github-actions
Copy link

github-actions bot commented Mar 7, 2020

Stale issue message

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants