Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Pyr | |
Old Version | Published before Godot 3 was released. |
Hi everyone,
I’m working on a 2D mobile game and I have a really hard time understanding the stretch aspect options.
Given a 2D stretch mode, how are not matching aspect ratios handled?
This is what I grasped:
- Ignore: scales the original resolution to fit the device’s resolution. If the original aspect ratio is different, it is stretched to match the new one → causes distortion, no cropping, no black bars.
- Keep: scales the original resolution to fit the device’s resolution. If the original aspect ratio is different, black bars are added → no distortion, no cropping.
- Keep width: scales the original resolution to fit the device’s width.
case 1) if the height, scaled proportionally, is shorter than the device’s screen, it is made fit by rendering new content (for example a background image) → no distortion, greater xFov
case2) if the height, scaled proportionally, is taller than the device’s screen → ??? exceding height is cropped? - Keep height: scales the original resolution to fit the device’s height.
case 1) if the width, scaled proportionally, is shorter than the device’s screen, it is made fit by rendering new content (for example the rest of the level) → no distortion, greater yFov
case2) if the width, scaled proportionally, is taller than the device’s screen → ??? exceding height is cropped?
Am I correct? Can someone help me figure this out please?
Thanks a lot in advance!