Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How do I Letterbox??

How do I letterbox?? I can't find any setting.

When using the config below, I get a stretched screen for FullscreenMode of 0, and the resolution ignored for FullscreenMode of 1 or 2

 // If you set this to true, the the resolution stuff above will be ignored
 // 0 - True fullscreen
 // 1 - Windowed fullscreen
 // 2 - Windowed

I have also tried setting the "constrain aspect ratio" on my camera, but that has no effect.

I am using a PlayerCameraManager with an Orthographic camera in local-multiplayer mode WITHOUT a split screen (we keep all players on the screen and just use player controller 0's camera).

This is a top-down 2D orthographic project, and I need to constrain the aspect ratio of the screen because the world is designed for a specific aspect ratio.



I am willing to pay someone to help me with this if that helps.

Epic Staff, any clues to who could help me with this???

Product Version: UE 4.11
more ▼

asked Apr 29 '16 at 10:39 AM in Everything Else

avatar image

2.1k 67 84 77

avatar image TiagoLing May 01 '16 at 12:48 PM

Also interested in this, especially because some devices like the iPad have 4:3 resolution and stretching a 16:9 game onto it looks really bad.

avatar image CleanCut May 03 '16 at 03:37 AM

Surely a fourth-generation game engine with a 20-year history has some way of enforcing an aspect ratio!?!?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

The answer is: The aspect ratio implementation in PlayerCameraManager has not been finished. So I finished it. Then all you have to do is set the PlayerCameraManager's DefaultAspectRatio to the ratio you want and click ConstrainAspectRatio to true. Just like a Camera.

EPIC STAFF: Could you help me out with getting a PR accepted? My big question is, where should I branch from and what should I make the PR to? My first attempt at branching from the 4.11.2-release tag and making a PR for the 4.11 branch resulted in a 6,000+ commit PR. Which is just nuts.

 diff --git a/Engine/Source/Runtime/Engine/Classes/Camera/PlayerCameraManager.h b/Engine/Source/Runtime/Engine/Classes/Camera/PlayerCameraManager.h
 index eb2ff02..a9c6d4f 100644
 --- a/Engine/Source/Runtime/Engine/Classes/Camera/PlayerCameraManager.h
 +++ b/Engine/Source/Runtime/Engine/Classes/Camera/PlayerCameraManager.h
 @@ -200,7 +200,7 @@ protected:
         /** Default aspect ratio */
 -       UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=PlayerCameraManager)
 +       UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=PlayerCameraManager, meta=(ClampMin = "0.1", ClampMax = "100.0"))
         float DefaultAspectRatio;
         /** Color to fade to (when bEnableFading == true). */
 @@ -339,6 +339,10 @@ protected:
 +       /** True if black bars should be added if the destination view has a different aspect ratio */
 +       UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=PlayerCameraManager)
 +       uint32 bConstrainAspectRatio : 1;
         /** True when this camera should use an orthographic perspective instead of FOV */
         UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = PlayerCameraManager)
         uint32 bIsOrthographic : 1;
 diff --git a/Engine/Source/Runtime/Engine/Private/PlayerCameraManager.cpp b/Engine/Source/Runtime/Engine/Private/PlayerCameraManager.cpp
 index 7bf8275..7c15e93 100644
 --- a/Engine/Source/Runtime/Engine/Private/PlayerCameraManager.cpp
 +++ b/Engine/Source/Runtime/Engine/Private/PlayerCameraManager.cpp
 @@ -28,6 +28,7 @@ APlayerCameraManager::APlayerCameraManager(const FObjectInitializer& ObjectIniti
         DefaultFOV = 90.0f;
         DefaultAspectRatio = 1.33333f;
 +       bConstrainAspectRatio = false;
         DefaultOrthoWidth = 512.0f;
         bHidden = true;
         bReplicates = false;
 @@ -484,7 +485,8 @@ void APlayerCameraManager::UpdateViewTarget(FTViewTarget& OutVT, float DeltaTime
         //@TODO: CAMERA: Should probably reset the view target POV fully here
         OutVT.POV.FOV = DefaultFOV;
         OutVT.POV.OrthoWidth = DefaultOrthoWidth;
 -       OutVT.POV.bConstrainAspectRatio = false;
 +       OutVT.POV.AspectRatio = DefaultAspectRatio;
 +       OutVT.POV.bConstrainAspectRatio = bConstrainAspectRatio;
         OutVT.POV.bUseFieldOfViewForLOD = true;
         OutVT.POV.ProjectionMode = bIsOrthographic ? ECameraProjectionMode::Orthographic : ECameraProjectionMode::Perspective;
more ▼

answered May 13 '16 at 04:40 AM

avatar image

2.1k 67 84 77

avatar image CleanCut May 13 '16 at 04:59 AM

Here is my pull request for 4.11

edit: see next comment

avatar image CleanCut Jul 12 '16 at 09:53 PM

I found that PRs should be against the master branch. Here is the new pull request against the master branch.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question