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