diff options
author | Guilherme Felipe <guilhermefelipecgs@gmail.com> | 2015-09-03 19:23:39 -0300 |
---|---|---|
committer | Guilherme Felipe <guilhermefelipecgs@gmail.com> | 2015-09-03 19:23:39 -0300 |
commit | da895e8542fcd19545287e4a99654f17c2d4c3d8 (patch) | |
tree | 42ed3ce4c6b667363865d4dbdb5c3c0b24b01d9c /scene/2d | |
parent | 7900d5daf21434a9396894a7c3ac360c03938770 (diff) |
Fix for smoothing camera2D when you change zoom, fix #2074.
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/camera_2d.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp index 49683da226..52ae5d2954 100644 --- a/scene/2d/camera_2d.cpp +++ b/scene/2d/camera_2d.cpp @@ -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 { |