1
0
Fork 0
mirror of https://github.com/Reuh/ubiquitousse.git synced 2025-10-28 01:29:31 +00:00

input: improve value source

This commit is contained in:
Étienne Fildadut 2022-09-20 13:55:51 +09:00
parent 8b994608a2
commit 336f4f01a5
14 changed files with 129 additions and 55 deletions

View file

@ -33,7 +33,7 @@ local function joystickAxisFilter(input, new, joystick)
if input._joystick and joystick:getID() ~= input._joystick:getID() then
return nil -- ignore if not from the selected joystick
end
local deadzone = input:_deadzone()
local deadzone = input._deadzone
if math.abs(new) < deadzone then
return 0 -- apply deadzone on axis value
else