InputBehavior Properties |
The InputBehavior type exposes the following members.
Name | Description | |
---|---|---|
buttonDeadZone |
When an Action's axis value is below this threshold, GetButton will return false. This is useful if you map axes as buttons. If the value is too low, GetButton may always return true. If the value is 1, it will never return true.
| |
buttonDoublePressSpeed |
Time in seconds in which to register a button double-press or double-click.
| |
buttonDownBuffer |
Time in seconds to buffer GetButtonDown results. This makes GetButtonDown return TRUE for extra time beyond a single frame.
This is useful to prevent missing button presses when pressing very rapidly and the game ignores these presses due to some blocking action. Ex: Punching in rapid succession, but presses are ignored during the punch animation.
The buffer value should generally be very small such as 0.08 s, but this will depend on your specific needs.
| |
buttonLongPressExpiresIn |
Time in seconds after a long press is registered after which it will expire and no longer return true for any button events.
For example: If you want the press to expire 2 seconds after the press first registers true, set this value to 2.
[0 = Never expires]
| |
buttonLongPressTime |
Time in seconds that a button or axis must be held to register a long press.
| |
buttonRepeatDelay |
The duration in seconds before repeating will begin after the initial press when queried with GetButtonRepeating or the equivalent event. [0 = No delay]
| |
buttonRepeatRate |
The number of times per second the button state will be True when queried with GetButtonRepeating or the equivalent event.
| |
buttonShortPressExpiresIn |
Time in seconds after a short press is registered after which it will expire and no longer return true for any button events.
For example: If you want the press to expire 2 seconds after the press first registers true, set this value to 2.
This is useful, for example, if you want short and long presses to be mutually exclusive.
[0 = Never expires]
| |
buttonShortPressTime |
Time in seconds that a button or axis must be held to register a short press.
| |
customControllerAxisSensitivity |
All Custom Controller axes are multiplied by this value.
| |
digitalAxisGravity |
Speed (units/sec) that the axis value falls toward 0. This only affects axis values generated by button and key presses.
| |
digitalAxisInstantReverse |
When input is received in the opposite direction of the current flow, reverse the current value to the opposite sign and continue from there.
This only affects axis values generated by button and key presses.
| |
digitalAxisSensitivity |
Speed to move toward an axis value of 1.0 in units/sec. This only affects axis values generated by button and key presses.
| |
digitalAxisSimulation |
Enables digital axis simulation which makes button or key presses contribute to an Action's axis value gradually over time based on gravity and sensitivity.
This only affects axis values generated by button and key presses.
| |
digitalAxisSnap |
When input is received in the opposite direction of the current flow, snap axis value to 0 and continue from there.
This only affects axis values generated by button and key presses.
| |
id |
The id of this Input Behavior.
| |
joystickAxisSensitivity |
All joystick axes are multiplied by this value.
| |
mouseOtherAxisMode |
Affects how mouse axes other than X/Y contribute to the value. This affects the mouse wheel axis.
Mouse Axis - Value range goes beyond -1 to 1 depending on speed of movement. This value is the same value returned by Unity's Input.GetAxis when axis type is set to Mouse Movement. Mouse Other Axis Sensitivity is multiplied by the axis value.
Digital Axis - Any movement returns -1 to 1 and is smoothed by digital axes values. Mouse movement behaves like a button or keyboard key press. Mouse sensitivity does not affect this mode. Instead, all Digital Axis filters are applied.
| |
mouseOtherAxisSensitivity |
All mouse axes except X/Y are multiplied by this value.
| |
mouseXYAxisDeltaCalc |
Determines how the screen position delta (and therefore speed) is calculated for mouse X/Y axes.
An equvalent mouse movement on X and Y will yield a different result for delta X and delta Y if the screen width and height are not equal.
If you need the delta consistent between X and Y movement, change this to ScreenWidth or ScreenHeight and the delta will be calculated based on only one dimension.
Note that the returned value may exceed +/- 1.0 if set to a value other than Normal.
| |
mouseXYAxisMode |
Affects how mouse X/Y axes contribute to the value.
Mouse Axis - Value range that depends on speed of movement. The value can and does exceed +/- 1.0 by a large amount. This value is the same value returned by Unity's Input.GetAxis when axis type is set to Mouse Movement. Mouse Sensitivity is multiplied by the axis value.
Digital Axis - Any mouse movement returns a value from -1.0 to 1.0 and is smoothed by the digital axis filters. This makes mouse movement behave like a button or key press.
ScreenPositionDelta - A value from -1.0 to 1.0 that represents the distance moved across the screen over the update cycle. The value is normalized based on the width and height of the screen. A movement across the entire screen distance in one update cycle will return +/- 1.0.
Speed - A value based on the speed the mouse is moved across the screen. Speed is calculated from the mouse movement delta / delta time. The returned value can exceed +/- 1.0.
| |
mouseXYAxisSensitivity |
Mouse X/Y axes are multiplied by this value.
| |
name |
The name of this Input Behavior.
|