Files
wub 530cdbf98f animation riging
riged the lights to the root animatior ready for animation
2026-11-30 19:13:17 +00:00

28 lines
964 B
C#

namespace UnityEngine.XR.Interaction.Toolkit.Inputs.Haptics
{
/// <summary>
/// Allows for sending haptic impulses to a channel on a device from the XR input subsystem.
/// </summary>
/// <seealso cref="IXRHapticImpulseChannel"/>
/// <seealso cref="InputDevice.SendHapticImpulse"/>
public class XRInputDeviceHapticImpulseChannel : IXRHapticImpulseChannel
{
/// <summary>
/// The channel to receive the impulse.
/// </summary>
public int motorChannel { get; set; }
/// <summary>
/// The input device to send the impulse to.
/// </summary>
public InputDevice device { get; set; }
/// <inheritdoc />
public bool SendHapticImpulse(float amplitude, float duration, float frequency)
{
// InputDevice does not support sending frequency.
return device.SendHapticImpulse((uint)motorChannel, amplitude, duration);
}
}
}