Can't change viewport size

I would like to add a small gap between multiple viewports when the game uses splitscreen.

In GameViewportClient.cpp I have found in line 124/125:

SplitscreenInfo[ESplitScreenType::TwoPlayer_Horizontal].PlayerData.Add(FPerPlayerSplitscreenData(1.0f, 0.5f, 0.0f, 0.0f));
	SplitscreenInfo[ESplitScreenType::TwoPlayer_Horizontal].PlayerData.Add(FPerPlayerSplitscreenData(1.0f, 0.5f, 0.0f, 0.5f));

and in FPerPlayerSplitscreenData() I changed the values to my needs. I can also build the solution succesfully, but I just don’t see any changes in the editor while playing.

Do I look at the wrong location in the code?

Bump. Anyone has a hint?

Did you came up with any solution for this?

Hi HenningAx,

there is a problem with the code regarding the viewport area: [BUG] Splitscreen with 3 players doesn't work - Rendering - Epic Developer Community Forums , check wjhcc last comment.

His fix solved my issue, but unfortnuatly there are rendering artifacts which can be eliminated by resizing the viewport. Also aspect ratio in the camera settings should be deactivated.

Update If you put the command SceneCanvas->DrawTile(0,0,InViewport->GetSizeXY().X,InViewport->GetSizeXY().Y,0.0f,0.0f,1.0f,1.f,FLinearColor::Black,NULL,false);

before

// Draw the player views. if (!bDisableWorldRendering && !bUIDisableWorldRendering && PlayerViewMap.Num() > 0) //-V560 { GetRendererModule().BeginRenderingViewFamily(SceneCanvas,&ViewFamily); }

the artifacts are eliminated.