object.minValue

类型 数字
对象 输入轴
版本 版本 2024.3703
关键字 设备、输入、轴、最小、最小值、值

概述

指示轴输入事件将提供的最小值。此属性和 object.maxValue 属性对于理解轴接收的原始数据非常必要,因为它将指示该轴相对于其范围移动的距离。

小技巧

示例

-- 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 minimum property values to the log
    for axisIndex = 1,#inputAxes do
        local inputAxis = inputAxes[axisIndex]
        print( inputAxis.descriptor .. ": Min value = " .. tostring(inputAxis.minValue) )
    end
end