Merge pull request from smix8/tilemap_texture_offset_fix_3.5

This commit is contained in:
Rémi Verschelde 2022-06-08 22:46:04 +02:00 committed by GitHub
commit e9ca65207e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -568,7 +568,7 @@ void TileMap::update_dirty_quadrants() {
if (shape.is_valid()) {
if (tile_set->tile_get_tile_mode(c.id) == TileSet::SINGLE_TILE || (shapes[j].autotile_coord.x == c.autotile_coord_x && shapes[j].autotile_coord.y == c.autotile_coord_y)) {
Transform2D xform;
xform.set_origin(offset.floor());
xform.set_origin(offset.floor() + tile_ofs);
Vector2 shape_ofs = shapes[j].shape_transform.get_origin();
@ -617,7 +617,7 @@ void TileMap::update_dirty_quadrants() {
if (navpoly.is_valid()) {
Transform2D xform;
xform.set_origin(offset.floor() + q.pos);
xform.set_origin(offset.floor() + q.pos + tile_ofs);
_fix_cell_transform(xform, c, npoly_ofs, s);
RID region = Navigation2DServer::get_singleton()->region_create();
@ -668,7 +668,7 @@ void TileMap::update_dirty_quadrants() {
}
}
Transform2D navxform;
navxform.set_origin(offset.floor());
navxform.set_origin(offset.floor() + tile_ofs);
_fix_cell_transform(navxform, c, npoly_ofs, s);
vs->canvas_item_set_transform(debug_navigation_item, navxform);