Merge pull request #7947 from RandomShaper/fix-vis-notifier-2d

Fix VisibilityNotifier2D viewport offset issue
This commit is contained in:
Rémi Verschelde 2017-06-28 12:25:08 +02:00 committed by GitHub
commit 9e54e1f34f

View file

@ -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();