Centering for Different Mobile screens

I was wondering if there is a way to center a touch joystick to the bottom center of any mobile device in portrait mode. It seems like the position is determined by x and y in the touch interface setup but the x and y variable would vary depending on the size of the mobile. So how is “responsive coordinates” achieved to ensure consistency across mobile devices?

Thanks in advance

I think you can use UMG image instead, resembling a joystick, then make 4 buttons for up, down, left, right.

Hi there, thanks for the reply. Perhaps i wasn’t clear enough. I’m not talking about joystick creation. I’m talking about the fact that in the widgets editor the position of objects are given an x and y value. These can’t be set to 100% as an example such as popular webframe responsive frameworks. So i’m wondering in its simpliest form how to ensure that a widget item will stay in the center of the screen regardless of what mobile device it is viewed on, ios android different screen sizes

I see, well, you can use the ‘Anchor’ property to position each widget correctly. That’s the simplest and will work most of the time.

Okay ill give those ago. Thanks alot for your help

Open your touch interface BP under ‘controls’ you’ll see the ‘Centre’ X and Y coordinates to position the virtual thumbtack set the X value to 0.5

value <1 = relative to screen size
value >1 = is absolute position

you may also want to enable ‘prevent recenter’

1 Like