HapticEvent

A single moment in a custom haptic pattern played through IHaptics.Play.

Intensity and sharpness range from 0 to 1 and are clamped. Intensity controls how strong the sensation feels, sharpness how crisp against dull.

public readonly struct HapticEvent

Methods

Continuous

Creates a sustained vibration spanning the given duration.

public static HapticEvent Continuous(
  double time,
  double duration,
  double intensity = 1,
  double sharpness = 0.5)
ParameterSummary
double timeSeconds from the start of the pattern.
double durationHow long the vibration lasts, in seconds.
(optional) double intensityStrength of the sensation, from 0 to 1.
(optional) double sharpnessCrispness of the sensation, from 0 to 1.

Returns

Tap

Creates a brief, punctuated tap at the given time in the pattern.

public static HapticEvent Tap(
  double time,
  double intensity = 1,
  double sharpness = 0.5)
ParameterSummary
double timeSeconds from the start of the pattern.
(optional) double intensityStrength of the sensation, from 0 to 1.
(optional) double sharpnessCrispness of the sensation, from 0 to 1.

Returns