Merge pull request #19343 from bojidar-bg/x-fix-tilemap-shape-rotation
Fix bugs related to bad handling of rotated/translated shapes in tilemap
This commit is contained in:
commit
3aed396a30
2 changed files with 5 additions and 3 deletions
|
|
@ -466,10 +466,12 @@ void TileMap::_update_dirty_quadrants() {
|
|||
Transform2D xform;
|
||||
xform.set_origin(offset.floor());
|
||||
|
||||
Vector2 shape_ofs = tile_set->tile_get_shape_offset(c.id, i);
|
||||
Vector2 shape_ofs = shapes[i].shape_transform.get_origin();
|
||||
|
||||
_fix_cell_transform(xform, c, shape_ofs + center_ofs, s);
|
||||
|
||||
xform *= shapes[i].shape_transform.untranslated();
|
||||
|
||||
if (debug_canvas_item.is_valid()) {
|
||||
vs->canvas_item_add_set_transform(debug_canvas_item, xform);
|
||||
shape->draw(debug_canvas_item, debug_collision_color);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue