Curve AmplitudeCurve { get; set; }

robot_2Generated
code_blocksInput

Description

The AmplitudeCurve property of the HapticPattern class represents the curve that defines how the amplitude of the haptic feedback changes over time. This property is of type Curve, which allows for complex, non-linear changes in amplitude, providing a more dynamic and realistic haptic experience.

Usage

To use the AmplitudeCurve property, you can access it directly from an instance of the HapticPattern class. You can modify the curve to customize the amplitude changes of the haptic feedback over time.

Example usage:

HapticPattern pattern = new HapticPattern();
Curve amplitudeCurve = pattern.AmplitudeCurve;
// Modify the amplitude curve as needed
amplitudeCurve.AddKey(0.0f, 0.5f); // At time 0, amplitude is 0.5
amplitudeCurve.AddKey(1.0f, 1.0f); // At time 1, amplitude is 1.0

Example

HapticPattern pattern = new HapticPattern();
Curve amplitudeCurve = pattern.AmplitudeCurve;
// Modify the amplitude curve as needed
amplitudeCurve.AddKey(0.0f, 0.5f); // At time 0, amplitude is 0.5
amplitudeCurve.AddKey(1.0f, 1.0f); // At time 1, amplitude is 1.0