Arranging mobile controls around default jump button

IMG_6120
I would like for my game to have mobile controls similar to that of Jailbreak’s, which is shown in the image above.

I’ve already read this tutorial, so I have a placeholder position for the jump button, I just need help with how to arrange the other buttons in an arch/circular formation around the jump button.

My guess is that there’s a solution involving calculating stuff with pi and the diameters of the buttons to create adequate spacing, but I wanted to see the dev forum’s take on this.

If you’re using the ContextActionGui you’ll be updating the button positions using ContextActionService:SetPosition.
And if you are only ever going to have the same buttons then you could do explicit placeholders but yes, the more flexible way involves doing math to calculate points on a circle centered on the Jump Button and with whatever radius you want to space them apart.

1 Like

I don’t even think jailbreak have perfect arches like that, if you’re still interested in doing it mathematically instead of manually, feel free to use trigonometry to move objects in a specific direction, like straight up or diagonally

1 Like