Fix VisibilityNotifier2D reapplication of viewport offset

This commit is contained in:
Pedro J. Estébanez 2017-03-06 02:28:58 +01:00
parent 5dbf1809c6
commit 640d8aa458
1 changed files with 2 additions and 1 deletions

View File

@ -318,7 +318,8 @@ void Viewport::update_worlds() {
if (!is_inside_tree())
return;
Rect2 xformed_rect = (global_canvas_transform * canvas_transform).affine_inverse().xform(get_visible_rect());
Rect2 abstracted_rect = Rect2(Vector2(), get_visible_rect().size);
Rect2 xformed_rect = (global_canvas_transform * canvas_transform).affine_inverse().xform(abstracted_rect);
find_world_2d()->_update_viewport(this, xformed_rect);
find_world_2d()->_update();