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

Scaling TileMap scales physics layer incorrectly #67601

Closed
miscbill opened this issue Oct 19, 2022 · 1 comment · Fixed by #67754
Closed

Scaling TileMap scales physics layer incorrectly #67601

miscbill opened this issue Oct 19, 2022 · 1 comment · Fixed by #67754

Comments

@miscbill
Copy link

Godot version

4.0.beta3

System information

macos 12.1, Vulkan API 1.1.216 - Using Vulkan Device #0: Apple - Apple M1 Max

Issue description

When a TileMap is scaled, the collision polygons in its physics layers are scaled, but translated too far.

In this screen capture, the purple tiles have collision boxes. I expected the boxes to line up with the tiles. (The Node2D containing this TileMap has a scale of Vector2(1.5,1.5)
Screen Shot 2022-10-18 at 7 52 24 PM

Steps to reproduce

Create a tilemap.
In it's TileSet, add an atlas texture, make a few tiles from it.
Add a physics_layer to the TileSet.
Use the paint tool to give tiles distinguishable collision boxes in that physics layer.
On the TileMap, set "Collision Visibility Mode" to "Force Show".
Draw some tiles on your TileMap.
On the TileMap, set scale x and y to 1.5.
Run the scene, note the weirdly place collision polys.

Minimal reproduction project

tile_scale_test.zip

@groud groud self-assigned this Oct 19, 2022
@groud groud added this to the 4.0 milestone Oct 19, 2022
@Calinou
Copy link
Member

Calinou commented Oct 20, 2022

I can confirm this on 4.0.beta 0c23a2c while porting the 2D Isometric Game demo: godotengine/godot-demo-projects#782

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants