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

Ensure Camera2D.position_smoothing_speed is non-negative. #90167

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scene/2d/camera_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ void Camera2D::align() {
}

void Camera2D::set_position_smoothing_speed(real_t p_speed) {
position_smoothing_speed = p_speed;
position_smoothing_speed = MAX(0, p_speed);
_update_process_internal_for_smoothing();
}

Expand All @@ -636,7 +636,7 @@ real_t Camera2D::get_position_smoothing_speed() const {
}

void Camera2D::set_rotation_smoothing_speed(real_t p_speed) {
rotation_smoothing_speed = p_speed;
rotation_smoothing_speed = MAX(0, p_speed);
_update_process_internal_for_smoothing();
}

Expand Down
Loading