Open noidexe opened 4 years ago
This bug only seems to impact the tileset editor. When actually using the tileset in a tilemap all collisions are at the correct location
The problem here seems to be, that the tileset editor plugin ignores the transform property of the collision shape completely while "export to tileset" uses it to position the shape. This leads to problems when you want to edit a tileset that was created by the latter. I see two solutions that would not break compatibility with existing tilesets:
I would personally prefer the first option as it's a lot cleaner and less hacky even though it comes with quite some code changes. The second one would be easier to implement but might lead to problems in the future.
Any thoughts?
Yeah I think option 1 would be the best. .tres files are text based and can be edited and generated by scripts. I wouldn't want the editor plugin modifying what was a valid format until now and converting and reconverting on read and write all the time does feel hacky.
Still an issue in Godot 3.2.3.stable, on Windows 10 64-bit.
For anyone who tries to fix it in the future, the centered: true
issue also affects Navigation and Occlusion polygons.
(the title change may have been meant to reflect that, but I wanted to make sure it was specifically mentioned)
You can still work around it by disabling centered
on the sprite and redrawing the polygons before converting.
Godot version: 3.2 alpha 2
OS/device including version: Windows 10 64 bits
Issue description: Convert to TileSet generates incorrect collision shapes when sprites have
centered
set to true. It seems to just take thepolygon
property inside the CollisionPolygon2D and use those values to generate the collider.Disabling
centered
and manually redrawing the polygon will generate the correct collision shape when converting to tileset.Steps to reproduce:
Minimal reproduction project: https://github.com/godotengine/godot-demo-projects/tree/master/2d/platformer