The +/− accuracy of the data provided by the axis input. This value will always be greater than or equal to
0. For example, if the accuracy is
0.01, an axis value of
0.5 is accurate between
This applies to the axis raw value, not the normalized value.
An accuracy of
0 may indicate perfect accuracy, but it will more likely mean that the accuracy of the input device is unknown.
You can use this property to eliminate "noise" generated by an axis input device by ignoring axis values that are not beyond the accuracy range of the last recorded axis value.
-- Fetch all input devices currently connected to the system local inputDevices = system.getInputDevices() -- Traverse all input devices for deviceIndex = 1,#inputDevices do -- Fetch the input device's axes local inputAxes = inputDevices[deviceIndex]:getAxes() -- Print all axis accuracy values for axisIndex = 1,#inputAxes do local inputAxis = inputAxes[axisIndex] print( inputAxis.descriptor .. ": Accuracy = " .. tostring(inputAxis.accuracy) ) end end