GetHorizontalAxis

Returns a float value between -1 and 1 representing the horizontal value of the Ultimate Joystick.

using UnityEngine;

public class JoystickExample : MonoBehaviour
{
	// BE SURE TO ASSIGN THIS IN THE INSPECTOR //
	public UltimateJoystick joystick;

	void Update ()
	{
		float h = joystick.GetHorizontalAxis();
		
		// OR USE HORIZONTAL ACCESSOR //
		h = joystick.HorizontalAxis;
	}
}

Last updated