UpdatePositioning
This function is used internally to update the positioning of the joystick on the screen on Application start, and any time the screen changes size. You will most likely never need to use this.
using UnityEngine;
public class JoystickExample : MonoBehaviour
{
// BE SURE TO ASSIGN THIS IN THE INSPECTOR //
public UltimateJoystick joystick;
void Update ()
{
// If the space bar has been pressed...
if( Input.GetKeyDown( KeyCode.Space ) )
{
// Update the positioning of the joystick to the exact center of the screen.
joystick.UpdatePositioning( 50, 50 );
}
}
}Last updated