bevyengine/bevy · error · ButtonSettingsError
invalid parameter values release_threshold {} press_threshol
Error message
invalid parameter values release_threshold {} press_threshold {}, expected release_threshold <= press_threshold What it means
ButtonSettingsError::ReleaseThresholdGreaterThanPressThreshold: the thresholds are individually in range but inconsistent — release_threshold must be less than or equal to press_threshold so a button can be released before it is considered pressed again.
Source
Thrown at crates/bevy_input/src/gamepad.rs:331
/// The value of the `deadzone_upperbound` parameter.
deadzone_upperbound: f32,
},
/// The given parameter was not in range 0.0..=2.0.
#[error("invalid threshold {0}, expected 0.0 <= threshold <= 2.0")]
Threshold(f32),
}
/// Errors that occur when setting button settings for gamepad input.
#[derive(Error, Debug, PartialEq)]
pub enum ButtonSettingsError {
/// The given parameter was not in range 0.0..=1.0.
#[error("invalid release_threshold {0}, expected value [0.0..=1.0]")]
ReleaseThresholdOutOfRange(f32),
/// The given parameter was not in range 0.0..=1.0.
#[error("invalid press_threshold {0}, expected [0.0..=1.0]")]
PressThresholdOutOfRange(f32),
/// Parameter `release_threshold` was not less than or equal to `press_threshold`.
#[error("invalid parameter values release_threshold {} press_threshold {}, expected release_threshold <= press_threshold", release_threshold, press_threshold)]
ReleaseThresholdGreaterThanPressThreshold {
/// The value of the `press_threshold` parameter.
press_threshold: f32,
/// The value of the `release_threshold` parameter.
release_threshold: f32,
},
}
/// Stores a connected gamepad's metadata such as the name and its [`GamepadButton`] and [`GamepadAxis`].
///
/// An entity with this component is spawned automatically after [`GamepadConnectionEvent`]
/// and updated by [`gamepad_event_processing_system`].
///
/// See also [`GamepadSettings`] for configuration.
///
/// # Examples
///
/// ```View on GitHub (pinned to 396ca72708)
Solutions
- Reorder the thresholds so release_threshold <= press_threshold
- Clamp release_threshold to press_threshold before constructing settings
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/bevy_input/src/gamepad.rs:331 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bevyengine/bevy@396ca72708 (2026-08-20).
Data as JSON: /api/errors/1ce232399067db4d.
Report an issue: GitHub.