Click or drag to resize

InputBehavior Properties

The InputBehavior type exposes the following members.

Properties
  NameDescription
Public propertybuttonDeadZone
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.
Public propertybuttonDoublePressSpeed
Time in seconds in which to register a button double-press or double-click.
Public propertybuttonDownBuffer
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.
Public propertybuttonLongPressExpiresIn
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]
Public propertybuttonLongPressTime
Time in seconds that a button or axis must be held to register a long press.
Public propertybuttonRepeatDelay
The duration in seconds before repeating will begin after the initial press when queried with GetButtonRepeating or the equivalent event. [0 = No delay]
Public propertybuttonRepeatRate
The number of times per second the button state will be True when queried with GetButtonRepeating or the equivalent event.
Public propertybuttonShortPressExpiresIn
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]
Public propertybuttonShortPressTime
Time in seconds that a button or axis must be held to register a short press.
Public propertycustomControllerAxisSensitivity
All Custom Controller axes are multiplied by this value.
Public propertydigitalAxisGravity
Speed (units/sec) that the axis value falls toward 0. This only affects axis values generated by button and key presses.
Public propertydigitalAxisInstantReverse
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.
Public propertydigitalAxisSensitivity
Speed to move toward an axis value of 1.0 in units/sec. This only affects axis values generated by button and key presses.
Public propertydigitalAxisSimulation
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.
Public propertydigitalAxisSnap
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.
Public propertyid
The id of this Input Behavior.
Public propertyjoystickAxisSensitivity
All joystick axes are multiplied by this value.
Public propertymouseOtherAxisMode
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.
Public propertymouseOtherAxisSensitivity
All mouse axes except X/Y are multiplied by this value.
Public propertymouseXYAxisDeltaCalc
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.
Public propertymouseXYAxisMode
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.
Public propertymouseXYAxisSensitivity
Mouse X/Y axes are multiplied by this value.
Public propertyname
The name of this Input Behavior.
Top
See Also