# Switching between horizontal and vertical splitscreen at runtime

**URL:** <https://forums.unrealengine.com/t/switching-between-horizontal-and-vertical-splitscreen-at-runtime/427812>\
**Category:** Cinematics & Media\
**Tags:** split-screen, unreal-engine, splitscreen, CPP, question\
**Created:** [June 21, 2018, 2:35am UTC](https://forums.unrealengine.com/t/switching-between-horizontal-and-vertical-splitscreen-at-runtime/427812 "2018-06-21T02:35:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Defrost80](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Defrost80](https://forums.unrealengine.com/u/Defrost80)\
**Post date:** [June 21, 2018, 2:35am UTC](https://forums.unrealengine.com/t/switching-between-horizontal-and-vertical-splitscreen-at-runtime/427812/1 "2018-06-21T02:35:58Z")

</div>

As the question suggests, is it possible to switch between horizontal and vertical split screen views based on certain conditions that can occur while the game is running?

I know there is an option to select the split screen orientation from the settings menu, but is it possible in game?

I would appreciate any help.

---

<div class="post-metadata">

**Author:** ![J0000J](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@J0000J](https://forums.unrealengine.com/u/J0000J)\
**Post date:** [June 22, 2018, 3:16am UTC](https://forums.unrealengine.com/t/switching-between-horizontal-and-vertical-splitscreen-at-runtime/427812/2 "2018-06-22T03:16:53Z")

</div>

hmm… change the map settings in c++

```
auto Settings = const_cast<UGameMapsSettings*>(GetDefault<UGameMapsSettings>());
if (Vertical)
{
	Settings->TwoPlayerSplitscreenLayout = ETwoPlayerSplitScreenType::Vertical;
}
else {
	Settings->TwoPlayerSplitscreenLayout = ETwoPlayerSplitScreenType::Horizontal;
}

```

---

<div class="post-metadata">

**Author:** ![Defrost80](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Defrost80](https://forums.unrealengine.com/u/Defrost80)\
**Post date:** [June 22, 2018, 3:29pm UTC](https://forums.unrealengine.com/t/switching-between-horizontal-and-vertical-splitscreen-at-runtime/427812/3 "2018-06-22T15:29:09Z")

</div>

Sweet! I’ll give this a go as soon as I get back from work!
