x

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"

Mobile Screen Orientation

I am working on a mobile game that is played in portrait view. The problem is that there seems to be no way to set the camera aspect ratio to accommodate this. The Camera is always wider than it is tall, and so by using portrait mode the game still displays as though it is 16:9 while the phone is upright, creating massive letterboxes at the top and bottom. Rotating the camera is useless as it is then impossible to frame the entire game.

Landscape alt text

Portrait alt text

Product Version: Not Selected
Tags:
more ▼

asked Jul 27 '14 at 06:47 AM in Using UE4

avatar image

BlockyDK
51 2 4 13

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

1 answer: sort voted first

Problem solved. Set the camera aspect ratio to 0.5625 (16/9).

more ▼

answered Nov 07 '14 at 09:59 PM

avatar image

BlockyDK
51 2 4 13

avatar image fishman59 Nov 07 '14 at 10:19 PM

Glad to hear this solved your problem. Out of interest, what event do you use to capture the rotation? And how are you handling other aspect ratios (ie other mobile devices)

avatar image BlockyDK Nov 07 '14 at 10:26 PM

My screen is fixed, so I don't need to capture the rotation. It is always played in portrait, and always fills the screen. As for other aspect ratios, I'm locking it for now, so it just gives me letterboxes on other devices. I believe that you can however create device profiles that change the settings per device. So look into the documentation for device profiles.

avatar image Pumpkin King Feb 02 '16 at 10:46 PM

There is a setting in Edit->Project Settings->Android called Orientation where you're able to set it to: portrait, reverse portrait, sensor portrait, landscape, reverse landscape, sensor landscape, sensor or full sensor. Hope this helps someone.

avatar image mikinw Sep 03 '16 at 04:09 PM

Is there a way to set it on a per Level basis? Eg. the menu is portrait, but the game is landscape.

avatar image Simfo Apr 08 '17 at 08:25 PM

You can use Get Gravity node from the Game mode or Pawn for determine the screen orientation.

(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