X Tutup
Skip to content

Fix TileMapLayer transformations for Node2D scene tiles#112790

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
kleonc:tile_map_layer_fix_scene_tile_transformations
Nov 18, 2025
Merged

Fix TileMapLayer transformations for Node2D scene tiles#112790
Repiteo merged 1 commit intogodotengine:masterfrom
kleonc:tile_map_layer_fix_scene_tile_transformations

Conversation

@kleonc
Copy link
Member

@kleonc kleonc commented Nov 14, 2025

Noticed #108010 got merged, but it's completely broken as #108010 (comment) was never addressed, the scale is still being added. 🙃

While at it I've changed it to:

  • Not rely on changing rotation, which is not precise (regardless whether using degrees/radians), contrary to directly applying flips/transpose to basis axes.
  • Apply whole cell transform at once, including the cell position.

Note that currently placing a scene tile with non-default transform flags will throw an error, as tranforms flags are not ignored from the id here:

bool TileSetScenesCollectionSource::get_scene_tile_display_placeholder(int p_id) const {
ERR_FAIL_COND_V(!scenes.has(p_id), false);
return scenes[p_id].display_placeholder;
}

But seems it needs to be handled properly in few other places as well. Leaving it for another PR, should be probably resolved at once with #112175.

@kleonc kleonc added this to the 4.6 milestone Nov 14, 2025
@kleonc kleonc requested a review from groud November 14, 2025 23:36
@kleonc kleonc requested a review from a team as a code owner November 14, 2025 23:36
@kleonc kleonc force-pushed the tile_map_layer_fix_scene_tile_transformations branch from 367d388 to 944bd82 Compare November 14, 2025 23:39
Copy link
Member

@groud groud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah damned, I approved the other PR a bit fast.
That's a good fix, thanks!

@Repiteo Repiteo merged commit e3350cf into godotengine:master Nov 18, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 18, 2025

Thanks!

@kleonc kleonc deleted the tile_map_layer_fix_scene_tile_transformations branch November 18, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup