Ask Your Question
0

How can I avoid undesirable stretching when using Unity in orthographic mode?

asked 2022-11-01 11:00:00 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-10-16 12:00:00 +0000

huitzilopochtli gravatar image

To avoid undesirable stretching when using Unity in orthographic mode, make sure that the camera's aspect ratio matches the resolution of the game window.

  1. Go to Edit -> Project Settings -> Player.
  2. In the Resolution and Presentation section, set the aspect ratio to be the same as your game window's aspect ratio.
  3. Make sure that your game window's aspect ratio is the same as your camera's aspect ratio. You can set the camera's aspect ratio in the Camera component's settings.
  4. Make sure that your sprites and UI elements are all displayed at their native resolution. You can do this by setting the "Pixels Per Unit" value of each sprite to match its pixel dimensions.

By ensuring that all aspects of your game are set to their native resolution and aspect ratio, you can avoid unwanted stretching in orthographic mode.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-11-01 11:00:00 +0000

Seen: 12 times

Last updated: Oct 16 '21