Enum amethyst_input::Axis [−][src]
pub enum Axis {
Emulated {
pos: Button,
neg: Button,
},
Controller {
controller_id: u32,
axis: ControllerAxis,
invert: bool,
dead_zone: f64,
},
}Represents any input represented by a float value from -1 to 1. Retrieve the value of this with axis_value.
Variants
EmulatedRepresents an emulated analogue axis made up of pair of digital inputs,
like W and S keyboard buttons or DPadUp and DPadDown controller buttons.
Fields of Emulated
pos: Button | Positive button, when pressed down axis value will return 1 if |
neg: Button | Negative button, when pressed down axis value will return -1 if |
ControllerRepresents an analogue axis of a controller.
Fields of Controller
controller_id: u32 | A number representing specific controller, assigned and reused in order of connection. |
axis: ControllerAxis | |
invert: bool | |
dead_zone: f64 | Treat input values from -dead_zone to dead_zone as 0, linearly interpolate remaining ranges. |