-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Deadzone clipping in AxisSettings and ButtonSettings results in a compression of values #3450
Description
Problem
The current behavior of AxisSettings is:
- If an axis's value is below the low-threshold, set them to 0.0.
- If an axis's is above the high-threshold, set them to 1.0.
This is sensible enough, and it's useful to be able to configure this in order to control dead zones and partially account for controller drift.
However, this results in a compression of values: rather than the controller always being able to send values from -1.0 to 1.0, they can only send values in a restricted range: the high, low and near-zero values are just clipped out.
This is undesirable because it causes player-configurable settings which are intended to account for strange quirks in physical controller behavior to have unintuitive and far-reaching gameplay effects.
The same effect occurs for analogue buttons like triggers in ButtonSetttings.
Proposed Solution
Rescale values to cover the full range regardless of the configuration. The formula (for positive values) is:
let new_value = (value - positive_low) / (positive_high - positive_low);If the game cares about the original raw input values instead, they can intercept the event stream themselves.
Alternatives
Make this a configurable setting, and keep the current behavior if the rescale_values field in the AxisSettings is set to false.