GetVerticalAxis

Returns a float value between -1 and 1 representing the vertical 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 v = joystick.GetVerticalAxis();
		
		// OR USE HORIZONTAL ACCESSOR //
		v = joystick.VerticalAxis;
	}
}

Last updated

Was this helpful?