diff options
author | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2017-03-06 02:28:58 +0100 |
---|---|---|
committer | Pedro J. Estébanez <pedrojrulez@gmail.com> | 2017-03-06 02:28:58 +0100 |
commit | 640d8aa4586fa4c46b6284d81ee2d494691d3948 (patch) | |
tree | a625fd6c7ebdb77230fa8a06a0993cccaec29e98 /scene/main | |
parent | 5dbf1809c6e3e905b94b8764e99491e608122261 (diff) |
Fix VisibilityNotifier2D reapplication of viewport offset
Diffstat (limited to 'scene/main')
-rw-r--r-- | scene/main/viewport.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 23f8189167..687d748d93 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -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(); |