Joystick Toolkit - @octave_joystick/axis


: joy = axis (joy, id)

Get the value of axis id on joystick joy.

Inputs

joy - a previously opened joystick object
id - a positive numeric id for the joystick axis to use

id can be a vector of ids to allow getting multiple axis.

Outputs

value - value of the axis between -1 .. 1.

value will be a vector of values when getting multiple axis.

Examples

Open device 1 and get value of axis 1

 
 joy = vrjoystick(1);
 val = axis(joy, 1)
 
 

See also: vrjoystick.