You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alice-i-cecile opened this issue
Dec 27, 2021
· 0 comments
· May be fixed by #17015
Labels
A-InputPlayer input via keyboard, mouse, gamepad, and moreC-BugAn unexpected or incorrect behaviorD-TrivialNice and easy! A great choice to get started with Bevy
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.
The text was updated successfully, but these errors were encountered:
A-InputPlayer input via keyboard, mouse, gamepad, and moreC-BugAn unexpected or incorrect behaviorD-TrivialNice and easy! A great choice to get started with Bevy
Problem
The current behavior of
AxisSettings
is: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:
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 theAxisSettings
is set to false.The text was updated successfully, but these errors were encountered: