object.maxValue

Type Number
Object InputAxis
Revision Release 2022.3683
Keywords device, input, axis, max, maximum, value

Overview

Indicates the maximum value that an axis input event will provide. This property and the object.minValue property are needed to make sense of the raw data received by an axis because it will indicate how far that axis has been moved relative to its range.

Gotchas

Example

-- 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 maximum property values
    for axisIndex = 1,#inputAxes do
        local inputAxis = inputAxes[axisIndex]
        print( inputAxis.descriptor .. ": Max value = " .. tostring(inputAxis.maxValue) )
    end
end