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

Camera2D: Fix condition on 'jump to limits' logic #55417

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

ek68794998
Copy link
Contributor

Pull request #49409 (which was created for #32596) introduced a regression where if a user has smoothing_enabled = false and limit_smoothed = true on a Camera2D, and the camera is pointing outside any defined limits, the camera would simply be stuck until reset_smoothing() was called.

This change updates the logic that decides whether to smooth into bounds to be effective only if smoothing_enabled && limit_smoothing_enabled.

(For anyone needing a workaround prior to this being merged, either set limit_smoothed to false or invoke reset_smoothing() manually.)

Fixes #54856.

@ek68794998 ek68794998 requested a review from a team as a code owner November 28, 2021 17:46
@Chaosus Chaosus added this to the 4.0 milestone Nov 28, 2021
@akien-mga akien-mga changed the title Fix condition on 'jump to limits' logic Camera2D: Fix condition on 'jump to limits' logic Nov 29, 2021
@akien-mga akien-mga added cherrypick:3.4 cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Nov 29, 2021
@akien-mga akien-mga merged commit cae5615 into godotengine:master Nov 29, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.5.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Nov 29, 2021
@akien-mga
Copy link
Member

Cherry-picked for 3.4.1.

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.4] Camera2D doesn't snap into the limits when limit smoothing is enabled
3 participants