X Tutup
Skip to content

GridMap: fix cell scale not applying to the cursor mesh#104510

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
fstxz:gridmap-preview-scale
Oct 1, 2025
Merged

GridMap: fix cell scale not applying to the cursor mesh#104510
Repiteo merged 1 commit intogodotengine:masterfrom
fstxz:gridmap-preview-scale

Conversation

@fstxz
Copy link
Contributor

@fstxz fstxz commented Mar 23, 2025

Cursor's basis gets scaled by cell's scale, but then gets overwritten when the code enters the if statement. I changed = to *= to keep the scale.

Fixes #104247

@fstxz fstxz requested a review from a team as a code owner March 23, 2025 09:44
@AThousandShips AThousandShips added bug topic:editor regression topic:3d cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release labels Mar 23, 2025
@AThousandShips AThousandShips added this to the 4.5 milestone Mar 23, 2025
@AThousandShips AThousandShips requested a review from a team March 23, 2025 10:48
@Repiteo Repiteo added the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Sep 18, 2025
@Repiteo Repiteo modified the milestones: 4.5, 4.x Sep 18, 2025
@fstxz
Copy link
Contributor Author

fstxz commented Sep 25, 2025

Can this be moved to 4.6, please? It's a simple fix for a regression that was introduced in 4.4.

@Calinou Calinou modified the milestones: 4.x, 4.6 Sep 25, 2025
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally, it works as expected. Code looks good to me.

Note that the cursor mesh is still not scaled by the GridMap node's scale (or its parents'). This could be worth looking into for a future PR.

Image Image

@fstxz
Copy link
Contributor Author

fstxz commented Sep 26, 2025 via email

@fstxz
Copy link
Contributor Author

fstxz commented Sep 26, 2025

Note that the cursor mesh is still not scaled by the GridMap node's scale (or its parents').

I can't reproduce this. This is with parent's scale set to (5, 1, 1), same thing happens when scaling GridMap node:

image

Note: I rebased this PR before testing to avoid full recompilation, perhaps this was already fixed?

Upd: I believe this is fixed by this PR, because I was able to reproduce this after switching to master.

@Calinou
Copy link
Member

Calinou commented Sep 26, 2025

Upd: I believe this is fixed by this PR, because I was able to reproduce this after switching to master.

Nevermind, I was actually testing on master because I was running on Windows while recompiling and the new binary couldn't be written (as it was being used).

Regardless, this PR should be good to go.

@Repiteo Repiteo merged commit 45502d1 into godotengine:master Oct 1, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 1, 2025

Thanks!

@fstxz fstxz deleted the gridmap-preview-scale branch October 1, 2025 13:12
@Repiteo
Copy link
Contributor

Repiteo commented Oct 6, 2025

Cherry-picked to 4.5

@Repiteo Repiteo removed the cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release label Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release regression topic:editor topic:3d

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mesh scale does not apply to GridMap preview anymore since 4.4

4 participants

X Tutup