Struct SendHapticImpulseCommand
A device command sent to a device to set it's motor rumble amplitude for a set duration.
Namespace: UnityEngine.InputSystem.Plugins.XR.Haptics
Syntax
public struct SendHapticImpulseCommand : IInputDeviceCommandInfo
Remarks
This is directly used by the SimpleXRRumble class. For clearer details of using this command, see that class.
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 |
|---|---|---|
| System.Int32 | motorChannel | The desired motor you want to rumble |
| System.Single | motorAmplitude | The desired motor amplitude that should be within a [0-1] range. |
| System.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(InputDeviceCommand). See XRHaptics for more details. |
GetTypeStatic()
Declaration
public FourCC GetTypeStatic()
Returns
| Type | Description |
|---|---|
| FourCC |