Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tilemap editor move_layer sorting error #83142

Closed
dream-young-soul opened this issue Oct 11, 2023 · 2 comments · Fixed by #83151
Closed

tilemap editor move_layer sorting error #83142

dream-young-soul opened this issue Oct 11, 2023 · 2 comments · Fixed by #83151

Comments

@dream-young-soul
Copy link

Godot version

4.2 dev6

System information

Godot v4.2.dev6.mono - Windows 10.0.23560 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3050 (NVIDIA; 31.0.15.5009) - 12th Gen Intel(R) Core(TM) i5-12490F (12 Threads)

Issue description

Create two new layers in the Tilemap editor and exchange the order of the two layers. The corresponding editor displays no sorting.
Only by editing the TileMap view or reopening the scene will it be displayed correctly.

QQ20231011-19433-HD.mp4

Steps to reproduce

  1. Create a new TileMap node
  2. Create two new Layers
  3. Exchange two layers
  4. View the editor’s TileMap display

Minimal reproduction project

tilemap_test.zip

@groud
Copy link
Member

groud commented Oct 11, 2023

The problem comes from the fact Y-sorting is enabled on the TileMap node but not on any of the layer. This makes it so each layer is Y-sorted as a whole. Thus the system tries to Y-sort the layers which causes issues as they have the exact same position (more or less).

I added a warning in my local fork about that, but I guess I can PR it to master too.

@dream-young-soul
Copy link
Author

问题来自于 TileMap 节点上启用了 Y 排序,但未在任何图层上启用。这使得每一层作为一个整体都是 Y 排序的。因此,系统尝试对导致问题的层进行 Y 排序,因为它们具有完全相同的位置(或多或少)。

我在我的本地分支中添加了一个关于这一点的警告,但我想我也可以通过 PR 来掌握它。

The problem comes from the fact Y-sorting is enabled on the TileMap node but not on any of the layer. This makes it so each layer is Y-sorted as a whole. Thus the system tries to Y-sort the layers which causes issues as they have the exact same position (more or less).

I added a warning in my local fork about that, but I guess I can PR it to master too.

This problem still occurs when Y sorting is not enabled in TileMap。

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants