View Issue Details

IDProjectCategoryView StatusLast Update
0031716DocumentationManual ContentPublic2020-05-14 09:34
ReporterDanAssigned ToMark Alexander 
PriorityLowSeverityC - GeneralReproducibility100%
Status AssignedResolutionOpen 
Platform-OSWindows 10OS VersionPro x64
Product Version2.2.5 
Target VersionFixed in Version 
Summary0031716: Manual Content: Should clarify how gamepad_set_button/axis_threshold() affects gamepad_button/axis_value()
DescriptionThe manual is not clear on what setting a threshold for a pad button means when later detecting pad inputs. We should add content to explain the following:

gamepad_button_value() ignores any gamepad_set_button_threshold() setting and will always return the raw value of the button/trigger. It does this because we already have the 3 "pressed"/"check"/"released" functions which DO account for the threshold before returning the button/trigger's state. If you want to account for the threshold, simply use the standard button input functions.

gamepad_axis_value() does account for gamepad_set_axis_threshold() settings, as there is no other method of determining if a stick is being moved and you always need the raw value.


As a slight aside, it might also be worth mentioning on both ..._threshold() function pages that the initial position is still 0.1 and the value still progressively grows to 1.0 regardless of what threshold you set. E.g, setting a threshold of 0.8 won't mean your values are clamped between 0.81 and 1.0. It will just mean in that last 20% of the stick travel your values will go from 01. to 1.0. Setting the threshold to 0.6 means the last 40% will cause 0.1 to 1.0. And so on...
Steps To Reproduce1. See the two manual pages for gamepad_set_axis_threshold() and gamepad_set_button_threshold() - observe that neither of them clarify the above.
2. Same for gamepad_button_value() and gamepad_axis_value().
Repro: 100%
Tags2.2.5.481

Activities

Dan

2020-05-13 14:20

Adminstrator  

GamepadThresholds.yyz (14,092 bytes)

Fritz

2020-05-14 09:34

Manager   ~0065616

Check with Russ if anything's not clear