Description
The AmplitudeScale
property of the HapticEffect
class is a float
value that determines the intensity of the haptic feedback. This property allows you to scale the amplitude of the haptic effect, effectively controlling how strong or weak the feedback feels to the user.
Usage
To use the AmplitudeScale
property, you need to create an instance of the HapticEffect
class or use one of its predefined static instances. You can then set the AmplitudeScale
to a desired value to adjust the intensity of the haptic feedback.
Example
// Create a new HapticEffect instance
HapticEffect myHapticEffect = new HapticEffect();
// Set the amplitude scale to 0.5 for a moderate intensity
myHapticEffect.AmplitudeScale = 0.5f;
// Use a predefined haptic effect and adjust its amplitude
HapticEffect softImpact = HapticEffect.SoftImpact;
softImpact.AmplitudeScale = 0.8f; // Increase the intensity slightly