Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix editor Parallax2D grid snap movement #101808

Merged

Conversation

markdibarry
Copy link
Contributor

@markdibarry markdibarry commented Jan 19, 2025

Closes #97601

As far as I can see the editor avoids updating the position when grid snap is on because it sends multiple of the same value causing an early return. I think that guard should be there in most cases, but in the editor it makes sense to remove.

2025-01-19.13-40-59.mp4

@markdibarry markdibarry requested a review from a team as a code owner January 19, 2025 18:31
@AThousandShips AThousandShips added this to the 4.4 milestone Jan 20, 2025
@AThousandShips AThousandShips added usability cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Jan 20, 2025
@Mickeon
Copy link
Contributor

Mickeon commented Jan 21, 2025

Not using set_scroll_offset directly feels a bit odd to me, as the added code is the same minus the early return. This is still a decent solution, so perhaps it's worth commenting on why this is done?

Verified

This commit was signed with the committer’s verified signature.
AThousandShips A Thousand Ships
@markdibarry markdibarry force-pushed the parallax-remove-editor-offset-guard branch from 444532c to ce139f7 Compare January 21, 2025 13:22
@Repiteo Repiteo merged commit 3d6821b into godotengine:master Jan 31, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jan 31, 2025

Thanks!

@markdibarry markdibarry deleted the parallax-remove-editor-offset-guard branch February 8, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release topic:editor topic:2d usability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moving Parallax2D node using the move tool with grid snap enabled causes rubber-banding effect.
5 participants