Class

CHHapticParameterCurve

A curve that you send to a haptic pattern player to alter a property value gradually during playback.

Declaration

@interface CHHapticParameterCurve : NSObject

Overview

Parameter curves serve the same purpose as dynamic parameters in that they alter a property value during playback. Unlike dynamic parameters, which change a property value instantaneously, parameter curves interpolate linearly between parameter values to ensure a smooth transition.

A rising blue line represents how a parameter curve changes the parameter's value gradually over time, while an orange line shows how dynamic parameters change the parameter's value immediately.

For example, a parameter curve for haptic intensity modulates the intensity over time, ensuring a smooth transition between the current intensity and the upcoming one. Parameter curves apply to all events in a pattern; it isn't possible to apply one to only a single event.

Topics

Creating a Curve

- initWithParameterID:controlPoints:relativeTime:

Creates a parameter curve from its parameter ID, control points, and start time.

CHHapticParameterCurveControlPoint

A single control point in a parameter curve.

Describing the Curve

controlPoints

An array containing the curve's control points.

parameterID

The parameter ID defining the type of parameter that the curve represents.

relativeTime

The time at which this parameter curve is applied, relative to the start time of the pattern.

Relationships

Inherits From

See Also

Programmatic Haptics

Playing Collision-Based Haptic Patterns

Play a custom haptic pattern whose strength depends on an object’s collision speed.

Updating Continuous and Transient Haptic Parameters in Real Time

Generate continuous and transient haptic patterns in response to user touch.

CHHapticEvent

An object that describes a single haptic or audio event.

CHHapticEventParameter

A static parameter value that represents a single property of the haptic pattern.

CHHapticDynamicParameter

A value that you send to a haptic pattern player to alter a property value during playback.