+1 vote

I couldn't find any solutions for this except for all the posts linking to the so-called deleted demo project split_screen_platformer (link: https://github.com/godotengine/godot-demo-projects/tree/master/2d/split_screen_platformer ).

in Engine by (4,165 points)
edited by

2 Answers

0 votes
Best answer

After looking at the source code of the deleted demo project,
this is what works for me:


And the script:

var world = $ViewportContainer/Viewport.find_world_2d()
$ViewportContainer2/Viewport.world_2d = world

Old demo links:

The code for parallax and split modes is also available in the last link.

by (4,165 points)
+1 vote

I created a split screen before in 3D.
All I did was create two viewports, each with their own camera, and show their textures in two texture_rects.

The same should apply in 2D, except you would need to use a camera2D instead (duh). And you may need to clear the world2D that it comes with.

view_port.world_2D = null

By the way I was basing that statement off of the viewport document, which looks kinda outdated; so you may want test that out yourself.

by (3,896 points)
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 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 webmaster@godotengine.org with your username.