Struct SendHapticImpulseCommand
A device command sent to a device to set it's motor rumble amplitude for a set duration.
Implements
Namespace: UnityEngine .InputSystem .XR.Haptics
Assembly: Unity.InputSystem.dll
Syntax
public struct SendHapticImpulseCommand : IInputDeviceCommandInfo
Remarks
This is directly used by the XRController
Properties
typeStatic
The data format identifier of the device command as a Four
Declaration
public FourCC typeStatic { get; }
Property Value
Type | Description |
---|---|
Four |
Methods
Create(int, float, float)
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 |
---|---|---|
int | motorChannel | The desired motor you want to rumble |
float | motorAmplitude | The desired motor amplitude that should be within a [0-1] range. |
float | motorDuration | The desired duration of the impulse in seconds. |
Returns
Type | Description |
---|---|
Send |
The command that should be sent to the device via |