SGHapticsComponent docs: add practical blueprint examples
This commit is contained in:
+57
@@ -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.
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
Because `bSendImmediate` is enabled, the squeeze is transmitted instantly instead of being queued.
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user