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:
parent
8b994608a2
commit
336f4f01a5
14 changed files with 129 additions and 55 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue