[3.x] Add a 2D version of the dynamic split screen demo #762
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here is an updated version of the dynamic split screen demo project that now includes a 2D implementation along the existing 3D one.
It took me some time to figure out a way to do this in 2D as cameras and viewports behave differently compared to 3D.
In the 3D version there are only 2 additional viewports, one per camera. In 2D, I had to create a third viewport to hold all the game content and share its2d_world
with the two other viewports. I don't know if there is a better way to do this.The shader is the same for both 2D and 3D but the scrips are all slightly different.
I also reworked the 3D scene so that it's more similar to the 2D one
(due to its 3rd viewport limitation)See #762 (comment)
Bugsquad edit: This closes #650.