SGHapticsComponent docs: add practical blueprint examples

This commit is contained in:
Mamadou Babaei
2026-02-24 11:44:03 +01:00
parent aeee16813b
commit 669629b849
4 changed files with 66 additions and 0 deletions
@@ -478,3 +478,60 @@ Queues a wrist-squeeze feedback at the desired level, and optionally if chosen,
- `true`: If queued successfully.
- `false`: If it fails.
## Blueprint Haptics Examples
Below are practical Blueprint examples demonstrating how to combine the different `SGHapticsComponent` functions into complete interaction flows.
### Force-Feedback Example
This example demonstrates:
- How to queue force-feedback with **full resistance on all fingers**.
- How to flush all queued haptics (including the recently queued force-feedback) using `Send Haptics`.
- How to stop all haptic effects after `2` seconds, if the send operation succeeds.
![SGHapticsComponent - Blueprint example: Force-feedback](sghapticscomponent-blueprint-example-force-feedback.png "SGHapticsComponent - Blueprint example: Force-feedback")
In this flow:
1. Force-feedback levels are queued for all fingers.
2. `Send Haptics` compiles and sends the command to the glove.
3. If successful, `Stop Haptics` is used to clear all active effects after `2` seconds.
### Vibrotactile Example
This example demonstrates:
- How to check if the glove at the current hand supports custom wave forms at the `Plam Pinky Side`.
- If so, it constructs a `SGCustomWaveform` with a duration of `500` milliseconds, amplitude of `1.0` at the frequency of `180.0` (maximum vibration on Nova 2).
- It then sets other parameters such as the `WaveType` to `Square` and the `RepeatAmount` to `10`.
- And, finally sends the custom waveforms to the glove, which is going to stop after `10` times playing.
This example demonstrates:
- How to check whether the current glove supports **custom waveforms** at the `Palm Pinky Side` location.
- How to construct a `SGCustomWaveform` with:
- `Duration``500 ms`
- `Amplitude``1.0`
- `Frequency``180.0 Hz` (maximum vibration on Nova 2)
- How to configure additional parameters such as:
- `Wave Type``Square`
- `Repeat Amount``10`
- How to send the custom waveform to the glove.
![SGHapticsComponent - Blueprint example: Vibrotactile](sghapticscomponent-blueprint-example-vibrotactile.png "SGHapticsComponent - Blueprint example: Vibrotactile")
The waveform will automatically stop after playing **10 repetitions**.
### Wrist-Squeeze Example
This example demonstrates:
- How to check whether the connected glove supports **wrist squeeze feedback**.
- How to apply a wrist squeeze at **50% intensity**.
- How to send the command immediately without requiring an additional `Send Haptics` call.
![SGHapticsComponent - Blueprint example: Wrist-squeeze](sghapticscomponent-blueprint-example-wrist-squeeze.png "SGHapticsComponent - Blueprint example: Wrist-squeeze")
Because `bSendImmediate` is enabled, the squeeze is transmitted instantly instead of being queued.