Struct amethyst_input::Axis [] [src]

pub struct Axis {
    pub pos: Button,
    pub neg: Button,
}

Represents an emulated analogue axis made up of digital inputs, like W and S or A and D. Two of these could be analogous to a DPAD.

Retrieve the value of this with axis_value.

Fields

Positive button, when pressed down axis value will return 1 if neg is not pressed down.

Negative button, when pressed down axis value will return -1 if pos is not pressed down.