Method SendHapticImpulse
SendHapticImpulse(InputActionReference, float, float, InputDevice)
Send a haptic impulse using an action reference
Declaration
public static void SendHapticImpulse(InputActionReference actionRef, float amplitude, float duration, InputDevice inputDevice = null)
Parameters
Type | Name | Description |
---|---|---|
Input |
actionRef | Action Reference to send haptic impulse through |
float | amplitude | Amplitude of the impulse [0-1] |
float | duration | Duration of the impulse [0-] |
Input |
inputDevice | Optional device to limit haptic impulse to |
SendHapticImpulse(InputActionReference, float, float, float, InputDevice)
Send a haptic impulse using an action reference
Declaration
public static void SendHapticImpulse(InputActionReference actionRef, float amplitude, float frequency, float duration, InputDevice inputDevice = null)
Parameters
Type | Name | Description |
---|---|---|
Input |
actionRef | Action Reference to send haptic impulse through |
float | amplitude | Amplitude of the impulse [0-1] |
float | frequency | Frequency of the impulse in hertz (Hz). (Typical frequency values are between 0 and 300Hz) (0 = default). Note that not all runtimes support frequency. |
float | duration | Duration of the impulse [0-] |
Input |
inputDevice | Optional device to limit haptic impulse to |
SendHapticImpulse(InputAction, float, float, InputDevice)
Send a haptic impulse using the given action
Declaration
public static void SendHapticImpulse(InputAction action, float amplitude, float duration, InputDevice inputDevice = null)
Parameters
Type | Name | Description |
---|---|---|
Input |
action | Action to send haptic impulse through |
float | amplitude | Amplitude of the impulse [0-1] |
float | duration | Duration of the impulse [0-] |
Input |
inputDevice | Optional device to limit haptic impulse to |
SendHapticImpulse(InputAction, float, float, float, InputDevice)
Send a haptic impulse using the given action
Declaration
public static void SendHapticImpulse(InputAction action, float amplitude, float frequency, float duration, InputDevice inputDevice = null)
Parameters
Type | Name | Description |
---|---|---|
Input |
action | Action to send haptic impulse through |
float | amplitude | Amplitude of the impulse [0-1] |
float | frequency | Frequency of the impulse in hertz (Hz). (Typical frequency values are between 0 and 300Hz) (0 = default). Note that not all runtimes support frequency. |
float | duration | Duration of the impulse [0-] |
Input |
inputDevice | Optional device to limit haptic impulse to |