Curve AmplitudeCurve { get; set; }

book_4_sparkGenerated
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 detailed control over the amplitude modulation throughout the duration of the haptic pattern.

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 behavior of the haptic feedback.

Example

// Example of accessing and modifying the AmplitudeCurve property
HapticPattern pattern = new HapticPattern();

// Access the AmplitudeCurve
Curve amplitudeCurve = pattern.AmplitudeCurve;

// Modify the AmplitudeCurve
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

// Use the modified pattern in your application
// (e.g., apply it to a haptic device or simulation)