Description
The LengthScale
property of the HapticEffect
class is a float
value that determines the scaling factor for the duration of the haptic effect. This property allows you to adjust how long the haptic feedback lasts, relative to its original duration.
Usage
To use the LengthScale
property, you can get or set its value on an instance of the HapticEffect
class. Adjusting this property will modify the duration of the haptic effect, allowing for customization of the feedback experience.
Example
// Create a new instance of HapticEffect
HapticEffect hapticEffect = new HapticEffect();
// Set the length scale to 1.5 to increase the duration by 50%
hapticEffect.LengthScale = 1.5f;
// Use the haptic effect in your application
// This will apply the effect with the adjusted duration
ApplyHapticEffect(hapticEffect);