Dynamic Split Screen Camera

Davide Socol - 蓝图 - 2024/03/27

Simple dynamic splitscreen for local and online coop

  • 支持的平台
  • 支持的引擎版本
    5.3 - 5.4
  • 下载类型
    完整项目
    此产品包含一个完整的虚幻引擎项目文件夹,含有配置文件、内容文件和.uproject文件,可以作为创建新项目的模板使用。

Overview Trailer | Documentation


What is it?

The Split Screen Camera system allows an easy jumpstart for any shared screen game!


The camera tracks the two players keeping them on screen while zooming in and out as needed, and when the max zoom level is reached splitting the screen dynamically to allow relative position between the players to be always easily understood by the players.


Every part of the project is clean and documented to allow easy learning and expanding of the system.


How does it work?

The player characters have an optimized scene capture attached instead of a regular camera, and the two views are combined together with a post-processing material. The players are tracked on screen and their settings adjusted to allow for seamless transition in all situations.


Local or Online Coop

The system works even for online coop, giving each player the complete view. Just remember to change/remove the BeginPlay event in the CoopGameMode which spawns the second local player and everything will work correctly.


Input

Input on the Character might require adjusting for completely side and top views, by default movement is based dynamically on the camera direction.


Performance

From my tests the performance is virtually the same as the standard splitscreen mode.



Project Settings (if migrating to another project)

  • Disable Use Splitscreen
  • Change Anti-Aliasing Method to something that's not TSR (it doesn't work with Scene Captures)
  • Enable Support global clip plane for Planar Reflections

技术细节

Features:

  •  Track two players on screen, with a dynamic zoom and a dynamic split view
  •  Debug widget to play around with the settings
  •  Demo map to play around

Number of Blueprints: 4 blueprints + 3 materials/functions

Input: Default keyboard and controller mapping, Look is not present in the CoopCharacter

Network Replicated: Yes

Supported Development Platforms:

Windows: Yes

Mac: Yes