diff --git a/modules/rtile_map/tile_map.cpp b/modules/rtile_map/tile_map.cpp index 8a106e322..21bb3b9f0 100644 --- a/modules/rtile_map/tile_map.cpp +++ b/modules/rtile_map/tile_map.cpp @@ -159,7 +159,11 @@ void RTileMap::_update_quadrant_transform() { Transform2D nav_rel; if (bake_navigation) { - nav_rel = get_relative_transform_to_parent(navigation); + if (navigation) { + nav_rel = get_relative_transform_to_parent(navigation); + } else { + nav_rel = get_transform(); + } } for (Map::Element *E = quadrant_map.front(); E; E = E->next()) { @@ -355,7 +359,11 @@ void RTileMap::update_dirty_quadrants() { Vector2 tofs = get_cell_draw_offset(); Transform2D nav_rel; if (navigation) { - nav_rel = get_relative_transform_to_parent(navigation); + if (navigation) { + nav_rel = get_relative_transform_to_parent(navigation); + } else { + nav_rel = get_transform(); + } } Vector2 qofs;