The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

+1 vote

In an earlier Godot version there was apparently a split_screen_demo under 2d in the demos folder, but that's no longer present.
I tried mimicking what I believe that was doing (having a viewport with the world in it, and an additional viewport for the second camera; the code there did this by calling viewport2.set_world_2d(viewport1.get_world_2d()). I believe the equivalent in Godot 3 is viewport2.world_2d = viewport1.world_2d.

However, when I do this, if I look at the results in the inspector I see that viewport2 gets a copy of the sprite that's under viewport. If I move the sprite under viewport, it doesn't update in viewport2's render target, and if I move the sprite under viewport2 it does, but then not under another view. This is the model I really don't want, a whole new copy of the world for each camera.

Is there a way to do it the way I want in Godot 3, rendering several windows onto the same world?

in Engine by (20 points)

I reported the issue, on first look it seems the demo hasn't been ported yet https://github.com/godotengine/godot-demo-projects/issues/224

I updated the godot 3 demo project (pull request) but there's also a full tutorial on how to do this in godot 3 at kidscancode's blog.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.