I’m making an android game in UE 5 where you simply keeping the ball in the air by pressing either the left or right side. My only obstacle, I have no idea how to do it. I want to make some borders (collision walls) on the left, right and top side of the phone. But depending on the phone screen size the borders will be placed accordingly.
For example, if I manually set the walls, on my phone it might be fine, looking as if the ball is bouncing off the screen side, but on a smaller screen size the ball will be slightly off screen or even go completely off screen, making the game annoyin . While on bigger screens it will seem as if it’s bouncing on nothing (which doesn’t affect gameplay that much).
So how exactly can I achieve these results ?
Here is a screenshot of how it currently looks (you can only see the top wall because the other are slightly off screen.)