Merge pull request #2764 from guilhermefelipecgs/fix_camera2d_set_zoom

Fix for smoothing camera2D when you change zoom.
This commit is contained in:
Juan Linietsky 2015-11-18 18:44:50 -03:00
commit e84fa04141

View file

@ -57,7 +57,9 @@ void Camera2D::_update_scroll() {
void Camera2D::set_zoom(const Vector2 &p_zoom) { void Camera2D::set_zoom(const Vector2 &p_zoom) {
zoom = p_zoom; zoom = p_zoom;
Point2 old_smoothed_camera_pos = smoothed_camera_pos;
_update_scroll(); _update_scroll();
smoothed_camera_pos = old_smoothed_camera_pos;
}; };
Vector2 Camera2D::get_zoom() const { Vector2 Camera2D::get_zoom() const {