Open michasng opened 1 year ago
I found this related issue: https://github.com/godotengine/godot/issues/31856
And I got my example to run without error by setting the visibility layer and light mask of the SubViewportContainer
to 2
and setting the Canvas Cull Mask of the SubViewport
to 1
.
The issue seems to be due to some recursive rendering issue. It would still be nice to have a better error message for this.
As a temporary solution, I found that putting the SubViewportContainer
under a new CanvasLayer
node breaks the rendering recursion.
Related:
There is another workaround, without CanvasLayer
: https://github.com/godotengine/godot/issues/81928#issuecomment-2337645721.
Godot version
v4.0.beta7.official [0bb1e89fb]
System information
Windows 10, Intel Core i7 10750H, Intel UHD Graphics, NVIDIA Quadro T1000
Issue description
When the main
world_2d
is assigned to aSubViewport.world_2d
, this error message is printed once per frame:I was trying to display parts of the world in a different position with the second viewport (which is actually working with this setup + some Camera2Ds). I was not expecting an error message here, let alone one that doesn't tell me how to solve the problem as a user.
Steps to reproduce
Create a new project with a
Node2D
Scene. Attach aSubViewportContainer
and aSubViewport
below it. Attach a script to the SubViewport with this snippet:Minimal reproduction project
test.zip