Foldable Field of View Guide – Unreal Engine

Foldable devices have a cover screen and a main screen that have different aspect ratios. The outer screen has an aspect ratio of 23.1:9 and the inner screen has an aspect ratio of 19:3. This means that extra considerations are needed to achieve the best user experience on either screen. Outside of foldable comparability, we recommend that you consider how the Field of View (FoV) is scaled.

Default field of view solution in Unreal Engine

Unreal Engine uses vertical FoV (Hor+) for its cameras by default.

This results in an issue when playing games in landscape mode on the Galaxy Fold series of devices. When switching displays, the FoV appears to change, resulting in the scene appearing larger or smaller and parts of the screen being hidden or revealed. For a vertical FoV (Hor+) example, see the images below:

<em>Figure 1: Cover Screen, Vertical FoV (Hor+)</em>
Figure 1: Cover Screen, Vertical FoV (Hor+)
<em>Figure 2: Main Screen, Vertical FoV (Hor+)</em>
Figure 2: Main Screen, Vertical FoV (Hor+)

The above example uses vertical FoV (Hor+). The cover screen is using the intended FoV when launching the app. When switching to the main screen, notice the "zoom" effect, where the character is much bigger and the sides of the environment are cropped.

Considerations for Field of View

In order to minimize this effect, we recommend using horizontal FoV (Vert-) in Unreal Engine. This can be achieved via two solutions:

Solution 1

The first and recommended option is to set AspectRatioAxisContraint in LocalPlayer. To do this, create a new class derived from ULocalPlayer and override PlayerAdded (which is used for instantiation).

void UTestLocalPlayer::PlayerAdded(UGameViewportClient* InViewportClient, FPlatformUserId InUserId)
{
    ULocalPlayer::PlayerAdded(InViewportClient, InUserId);

    AspectRatioAxisConstraint = EAspectRatioAxisConstraint::AspectRatio_MaintainXFOV;
}

Solution 2

The second option is to enable Override AspectRatioAxisConstraint on the camera. This overrides the value from ULocalPlayer.

Both options result in the vertical FoV changing between the two displays, so be aware that there is a possibility of some of the view being cropped by the FoV change.

For a horizontal FoV (Vert-) example, see the images below:

<em>Figure 3: Cover Screen, Horizontal FoV (Vert-)</em>
Figure 3: Cover Screen, Horizontal FoV (Vert-)
<em>Figure 4: Main Screen, Horizontal FoV (Vert-)</em>
Figure 4: Main Screen, Horizontal FoV (Vert-)

This solution preserves the sizes of objects, but might crop characters or vertical space .

Summary

We recommend that developers test their games on foldables and decide which axis to scale the FoV so the changes are less noticeable between the cover screen and main screen.