From f8df18ef47a32be7f5803d7bdc1562458bef6d5c Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Tue, 22 Nov 2022 23:04:23 +0100 Subject: Fix CanvasTransform on RenderingServer when Viewport enters Tree Previously the Viewport didn't initialize its canvas transform in the RenderingServer. --- scene/main/viewport.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 9e440405af..345d5de937 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -362,6 +362,7 @@ void Viewport::_notification(int p_what) { current_canvas = find_world_2d()->get_canvas(); RenderingServer::get_singleton()->viewport_attach_canvas(viewport, current_canvas); + RenderingServer::get_singleton()->viewport_set_canvas_transform(viewport, current_canvas, canvas_transform); RenderingServer::get_singleton()->viewport_set_canvas_cull_mask(viewport, canvas_cull_mask); _update_audio_listener_2d(); #ifndef _3D_DISABLED -- cgit v1.2.3