docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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
    InputActionReference actionRef

    Action Reference to send haptic impulse through

    float amplitude

    Amplitude of the impulse [0-1]

    float duration

    Duration of the impulse [0-]

    InputDevice 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
    InputActionReference 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-]

    InputDevice 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
    InputAction action

    Action to send haptic impulse through

    float amplitude

    Amplitude of the impulse [0-1]

    float duration

    Duration of the impulse [0-]

    InputDevice 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
    InputAction 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-]

    InputDevice inputDevice

    Optional device to limit haptic impulse to

    In This Article
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, November 1, 2023