Custom Runtime Positioning
In this tutorial, we will discuss a quick example of how to allow your players to customize the Ultimate Joystick's position on the screen.
Three different functions to use: StartOverridePositioning, StopOverridePositioning, OverrideJoystickSize. You can also reset the stored values by using the ResetOverridePositioning.
Overriding the Joystick's Position
To customize the joystick's position and size to cater to player preferences, follow these steps:
Step 1: Start Position Override
Call StartOverridePositioning
to enable the override mode that allows you to set a new position for the joystick.
Step 2: Players Move Joystick Position
After using the StartOverridePositioning function the Ultimate Joystick will stop functioning like a normal joystick and will now adjust it's position to where the player drags it. The information is stored every time the player releases input on the joystick, but the StopOverridePositioning function needs to be used in order to return the Ultimate Joystick to working normally.
Step 3: Stop Position Override
After adjusting the position and size, invoke StopOverridePositioning
to apply the changes and exit override mode.
Step 4: Reset to Default
If you need to revert to the default settings, use ResetOverridePositioning
to clear the stored overrides.
Last updated