1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Rename texture_offset and unclamp it

This commit is contained in:
Gilles Roudière
2023-01-26 18:47:54 +01:00
parent 4368191a9f
commit d7f3bd50bd
11 changed files with 126 additions and 87 deletions

View File

@@ -106,7 +106,7 @@ void TilesEditorPlugin::_thread() {
Vector2i coords = tile_map->get_cell_atlas_coords(0, cell);
int alternative = tile_map->get_cell_alternative_tile(0, cell);
Vector2 center = world_pos - atlas_source->get_tile_effective_texture_offset(coords, alternative);
Vector2 center = world_pos - atlas_source->get_tile_data(coords, alternative)->get_texture_origin();
encompassing_rect.expand_to(center - atlas_source->get_tile_texture_region(coords).size / 2);
encompassing_rect.expand_to(center + atlas_source->get_tile_texture_region(coords).size / 2);
}