Skip to content

Commit

Permalink
Fix for smoothing camera2D when you change zoom, fix godotengine#2074.
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermefelipecgs committed Sep 3, 2015
1 parent 7900d5d commit da895e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scene/2d/camera_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ void Camera2D::_update_scroll() {
void Camera2D::set_zoom(const Vector2 &p_zoom) {

zoom = p_zoom;
Point2 old_smoothed_camera_pos = smoothed_camera_pos;
_update_scroll();
smoothed_camera_pos = old_smoothed_camera_pos;
};

Vector2 Camera2D::get_zoom() const {
Expand Down

0 comments on commit da895e8

Please sign in to comment.