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

[Godot4.2dev2] When tileMap has multiple layers, the data returned by calling get_used_rect() is problematic. #81417

Closed
xlljc opened this issue Sep 7, 2023 · 0 comments · Fixed by #81423

Comments

@xlljc
Copy link

xlljc commented Sep 7, 2023

Godot version

4.2 dev2

System information

windows10

Issue description

There is a bug in calling get_used_rect() after creating multiple layers in TileMap.

Draw area not covered (0, 0) coordinates, but using get_used_rect () to obtain data for [P: (0, 0), S: (3, 3)], expect is [P (1, 1), S: (2, 2)].

In minimal reproduction project, in the main scene, TileMap1 has only one layer and TileMap2 has two layers, They are in the same position and draw the same content, But calling get_used_rect() gets a different value.
image

Note: This bug still exists in dev4, but not in dev1.

Steps to reproduce

In minimal reproduction project, running the main scene, you can see the data from TileMap1 and TileMap2 calling get_used_rect() in the console.

Minimal reproduction project

TestTileMap.zip

@kleonc kleonc added this to the 4.2 milestone Sep 7, 2023
@xlljc xlljc changed the title [Godot4.2dev2] When tileMao has multiple layers, the data returned by calling get_used_rect() is problematic. [Godot4.2dev2] When tileMap has multiple layers, the data returned by calling get_used_rect() is problematic. Sep 7, 2023
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.

2 participants