Skip to content

Commit 6a6efc1

Browse files
Mercury, 80Hgthegrb93
Mercury, 80Hg
andauthored
Add input.getAnalogValue (#1967)
* Update input.lua * remove check * Update lua/starfall/libs_sh/input.lua Co-authored-by: thegrb93 <[email protected]> --------- Co-authored-by: thegrb93 <[email protected]>
1 parent 3161315 commit 6a6efc1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lua/starfall/libs_sh/input.lua

+7
Original file line numberDiff line numberDiff line change
@@ -396,5 +396,12 @@ function input_library.isGameUIVisible()
396396
return gui.IsGameUIVisible()
397397
end
398398

399+
--- Returns the digital value of an analog stick on the current (set up via convars) controller.
400+
-- @name input_library.getAnalogValue
401+
-- @class function
402+
-- @client
403+
-- @param number axis The analog axis to poll. See https://wiki.facepunch.com/gmod/Enums/ANALOG
404+
-- @return number The digital value.
405+
input_library.getAnalogValue = input.GetAnalogValue
399406

400407
end

0 commit comments

Comments
 (0)