Struct AxisConfig
Maps keyboard, controller, or mouse inputs to a "friendly name" that will later be bound to continuous game behavior, such as movement. The inputs mapped in AxisMappings are continuously polled, even if they are just reporting that their input value.
Assembly: FlaxEngine.dll
File: Engine/Input/VirtualInput.h
Syntax
public struct AxisConfig
Fields
Axis
The axis type (mouse, gamepad, etc.).
Declaration
public InputAxisType Axis
Field Value
InputAxisType
|
DeadZone
Any positive or negative values that are less than this number will register as zero. Useful for gamepads to specify the deadzone.
Declaration
public float DeadZone
Field Value
float
|
Gamepad
Which gamepad should be used.
Declaration
public InputGamepadIndex Gamepad
Field Value
InputGamepadIndex
|
GamepadNegativeButton
The button to be pressed for movement in negative direction. Use GamepadButton.None to ignore it.
Declaration
public GamepadButton GamepadNegativeButton
Field Value
GamepadButton
|
GamepadPositiveButton
The button to be pressed for movement in positive direction. Use GamepadButton.None to ignore it.
Declaration
public GamepadButton GamepadPositiveButton
Field Value
GamepadButton
|
Gravity
For keyboard input describes how fast will the input recenter. Speed (in units/s) that output value will rest to neutral value if not when device at rest.
Declaration
public float Gravity
Field Value
float
|
Name
The axis "friendly name" used to access it from code.
Declaration
public String Name
Field Value
String
|
NegativeButton
The button to be pressed for movement in negative direction. Use KeyboardKeys.None to ignore it.
Declaration
public KeyboardKeys NegativeButton
Field Value
KeyboardKeys
|
PositiveButton
The button to be pressed for movement in positive direction. Use KeyboardKeys.None to ignore it.
Declaration
public KeyboardKeys PositiveButton
Field Value
KeyboardKeys
|
Scale
Additional scale parameter applied to the axis value. Allows to invert it or modify the range.
Declaration
public float Scale
Field Value
float
|
Sensitivity
For keyboard input, a larger value will result in faster response time (in units/s). A lower value will be more smooth. For Mouse delta the value will scale the actual mouse delta.
Declaration
public float Sensitivity
Field Value
float
|
Snap
If enabled, the axis value will be immediately reset to zero after it receives opposite inputs. For keyboard input only.
Declaration
public bool Snap
Field Value
bool
|