The playback engine of the
Haptics SDK only ever renders the vibrations of a single
HapticClipPlayer clip on the same controller at the same time. Meaning, haptic clips are not "mixed" when played back. If you have multiple players playing on the same controller at the same time, then only the player with the highest priority will trigger vibrations.Given the same priority value, the engine will always play the most recent clip that was started. All other players are muted, but continue tracking playback on their respective timeline (i.e. they are not paused). If a clip finishes (or is stopped), the engine will resume playback of the second most recent clip with an equal or higher priority level and so on.Example: Setting priority can be helpful if some haptic clips are more important than others, and allow us to design a hierarchy of haptic feedback based on context or the overall importance. For example, we could want a user to always receive a distinct haptic feedback if they are hit. Setting this "hit" clips priority higher compared to other haptic clips will ensure that the user always receives this haptic feedback.Priority values can be on the range of 0 (high priority) to 255 (low priority). By default, the priority value is set to 128 for every
HapticClipPlayer. The player's priority can be changed before and during playback. An integer value within the range 0 to 255 (inclusive). Values outside this range will cause an exception.