Trait InputModifier

Source
pub trait InputModifier:
    Sync
    + Send
    + Debug
    + 'static {
    // Required method
    fn apply(
        &mut self,
        action_map: &ActionMap,
        time: &Time<Virtual>,
        value: ActionValue,
    ) -> ActionValue;
}
Expand description

Pre-processor that alter the raw input values.

Input modifiers are useful for applying sensitivity settings, smoothing input over multiple frames, or changing how input maps to axes.

Can be applied both to inputs and actions. See ActionBinding::with_modifiers and BindingBuilder::with_modifiers.

Required Methods§

Source

fn apply( &mut self, action_map: &ActionMap, time: &Time<Virtual>, value: ActionValue, ) -> ActionValue

Returns pre-processed value.

Called each frame.

Implementors§