docs.unity3d.com
    目次を表示する/隠す

    Struct SendHapticImpulseCommand

    A device command sent to a device to set it's motor rumble amplitude for a set duration.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Namespace: UnityEngine.InputSystem.XR.Haptics
    Syntax
    public struct SendHapticImpulseCommand : IInputDeviceCommandInfo
    Remarks

    This is directly used by the XRControllerWithRumble class. For clearer details of using this command, see that class.

    Properties

    typeStatic

    Declaration
    public readonly FourCC typeStatic { get; }
    Property Value
    Type Description
    FourCC
    Implements
    IInputDeviceCommandInfo.typeStatic

    Methods

    Create(Int32, Single, Single)

    Creates a device command that can then be sent to a specific device.

    Declaration
    public static SendHapticImpulseCommand Create(int motorChannel, float motorAmplitude, float motorDuration)
    Parameters
    Type Name Description
    Int32 motorChannel

    The desired motor you want to rumble

    Single motorAmplitude

    The desired motor amplitude that should be within a [0-1] range.

    Single motorDuration

    The desired duration of the impulse in seconds.

    Returns
    Type Description
    SendHapticImpulseCommand

    The command that should be sent to the device via InputDevice.ExecuteCommand.

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)