summaryrefslogtreecommitdiff
path: root/scene/main/viewport.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-06-28 12:25:08 +0200
committerGitHub <noreply@github.com>2017-06-28 12:25:08 +0200
commit9e54e1f34f7ee0b100b45fa2388f25096eb90670 (patch)
tree7ba617f8b0caf043673c7bff7cf32786b7b7745e /scene/main/viewport.cpp
parent82298e989abfc6732e535704d2a303f0676d51bc (diff)
parent640d8aa4586fa4c46b6284d81ee2d494691d3948 (diff)
Merge pull request #7947 from RandomShaper/fix-vis-notifier-2d
Fix VisibilityNotifier2D viewport offset issue
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r--scene/main/viewport.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index a87c83f17c..3a9968d126 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -324,7 +324,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();