I'm making a little game and now I encountered a problem with viewport the best viewport to use for me is the fitViewport but it makes sides empty on specific sizes due to screen ratio. This is what the "problem" is :
This is what I'am trying and need to achieve:
Maybe anyone have encountered this with your own game, or have any solution to it so I could achieve what I need,
thanks sincerely Ignas.
Wasnt using extend screen properly, the extend screen helped!
You're using FitViewport having -
Pros :
Cons :
Black bar may be appear on screen.
According to your pictorial representation, StretchViewport
fit your requirement but in this viewport object become stretched and also aspect ratio not maintained.
I'll recommend you to use ExtendViewport
because It keeps the world aspect ratio without black bars. Check this answer.