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

[3.4] When limit smoothing and smoothing are enabled simultaneously and the Camera2D is outside of the limits, there is a one frame delay before the smoothing starts. #56913

Closed
MewPurPur opened this issue Jan 18, 2022 · 2 comments · Fixed by #63083

Comments

@MewPurPur
Copy link
Contributor

MewPurPur commented Jan 18, 2022

Godot version

3.4.stable

System information

Ubuntu 20.04.3 LTS

Issue description

When Camera2D has limit smoothing enabled, smoothing enabled, and is outside of the limits, it starts sliding to the new limits one frame late.
This behavior did not exist in 3.3, since the camera would always immediately snap into the limits in that version, which was changed in #49409
It also does not occur for smoothing in general, even if Camera2D has the same properties. If position is changed and then reset_smoothing is called in the same function, the camera will immediately slide there. The behavior outside of limits is inconsistent in this regard.

Steps to reproduce

  1. Create a Camera2D and set its limits to small numbers
  2. Enable Limit Smoothing and Smoothing
  3. Move the Camera2D outside of the limits.
  4. Run the project

Since it's just a one frame delay, to make the bug visible would take a bit more, in my minimal reproduction project I did the following:

  1. Create a script
  2. Call reset_smoothing on the Camera2D
  3. Pause the tree in the same function to see the delay.

Minimal reproduction project

Camera issue.zip
(Comment and uncomment the line that pauses the tree to see the jump clearly)

@MewPurPur
Copy link
Contributor Author

This persists in 3.5.rc1, but isn't in 4.0.alpha8

@Calinou Calinou modified the milestones: 4.0, 3.x May 23, 2022
@akien-mga
Copy link
Member

Related to / possible duplicate of #56336.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants