Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SGHapticsComponent

SGHapticsComponent, introduced in the SenseGlove Unreal Engine Plugin v2.8.0, provides a highly convenient, high-level interface for sending various types of haptic feedback to a SenseGlove device directly from Unreal Engine.

Prior to this release, integrating haptic feedback into a custom hand interaction system was possible in several ways:

  • SenseGlove low-level C++ API:
  • SenseGlove Blueprint API:
  • Additionally, there is the SGTouchComponent, which provides simplified and limited functionality. On its own, it cannot trigger haptics. It is designed to work in conjunction with the stock SGPlayerController shipped with the SenseGlove Unreal Engine plugin.

While all of the above approaches remain fully supported, whether in C++ or Blueprint, SGHapticsComponent eliminates some of the caveats associated with them, while still giving you full control in a significantly more convenient and streamlined manner.

Important

For more detailed information on Nova 2 Glove Vibration Tips & Tricks, please visit the in-depth guide available on SenseGlove Docs.

We strongly recommend reviewing that comprehensive upstream haptics documentation, as this guide focuses solely on applying haptic feedback from Unreal Engine.

A solid understanding of the SenseGlove haptics API and its hardware capabilities will help you follow and apply this guide effectively, while also enabling you to troubleshoot haptics-based Unreal Engine projects with confidence.

Adding the Component to Your Actors

Adding SGHapticsComponent is straightforward. In the Components panel, click the Add button and locate it under the SenseGlove section:

SGHapticsComponent - Adding component

SGHapticsComponent - Added component

Blueprint Properties

SGHapticsComponent exposes the following properties through the Details panel in Unreal’s Blueprint Editor:

SGHapticsComponent - Exposed Blueprint properties accessible via the Details panel

  • Right: If enabled, the component controls haptics feedback for the right hand. If disabled, it controls haptics for the left hand instead.
  • AutoStopAllHaptics: If enabled, automatically calls the StopHaptics() function when: 1) The component is uninitialized 2) the EndPlay event occurs 3) or, the handedness changes. This ensures that vibrations won't continue after the simulation ends, or when the active glove it controls, is switched mid-simulation.

C++ and Blueprint Functions

SGHapticsComponent provdies the following C++ methods:

public:
    FORCEINLINE bool IsLeft() const
    {
        return !IsRight();
    }

    FORCEINLINE bool IsRight() const
    {
        return bRight;
    }

    void SetRight(const bool bInRight);

    FORCEINLINE bool AutoStopsAllHaptics() const
    {
        return bAutoStopAllHaptics;
    }

    void SetAutoStopAllHaptics(const bool bInAutoStopAllHaptics)
    {
        bAutoStopAllHaptics = bInAutoStopAllHaptics;
    }

public:
    /**
     * Stops all Haptic effects if any are currently playing. Useful at the end of simulations or when restarting the
     * level.
     */
    void StopHaptics();

    /**
     * Stops only vibrations.
     */
    void StopVibrations();

    /**
     * Take all active commands in the device queue, compile them into one and send them to the device.
     *
     * @return Returns true if the message was successfully sent to SenseCom.
     */
    bool SendHaptics();

    /**
     * Returns true if the haptic glove supports vibration feedback at the specified location.
     *
     * @param AtLocation
     */
    bool SupportsCustomWaveform(ESGHapticLocation AtLocation) const;

    /**
     * Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support
     * custom waveforms.
     *
     * @param OutWaveform
     * @param Location
     */
    bool SendCustomWaveform(USGCustomWaveform* OutWaveform, ESGHapticLocation Location);

    /**
     * Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support
     * custom waveforms.
     *
     * @param Amplitude
     * @param Duration
     * @param Location
     */
    bool SendCustomWaveform(float Amplitude, float Duration, ESGHapticLocation Location);

    /**
     * Sends a custom waveform to the location specified, provided that the glove has a motor there, and can support
     * custom waveforms.
     *
     * @param Amplitude
     * @param Duration
     * @param Frequency
     * @param Location
     */
    bool SendCustomWaveform(float Amplitude, float Duration, float Frequency, ESGHapticLocation Location);

    /**
     * Queue a list of force-feedback levels, between 0.0f and 1.0f. Your list should be sorted from thumb to pinky.
     *
     * @param Levels01 Array containing the Force-Feedback levels, from 0.0f (no FFB) to 1.0f. A value < 0.0f will be
     * ignored.
     *
     * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0.
     */
    bool QueueForceFeedbackLevels(const TArray<float>& Levels01);

    /**
     * Set the Force-Feedback value of a particular finger to a specific level </summary>
     *
     * @param Level01 Value will be clamped between [0...1], where 0.0f means no Force-Feedback, and 1.0 means full
     * force-feedback.
     * @param Finger The finger to which to send the command.
     */
    bool QueueForceFeedbackLevel(int32 Finger, float Level01);

    /**
     * Queue a list of vibration levels, between 0.0 and 1.0. Your list should be sorted from thumb to pinky.
     *
     * @param Levels01 Array containing the vibration levels, from 0.0 (no vibration) to 1.0. A value < 0.0f will be
     * ignored.
     *
     * @remarks Devices that 'only' have on/off FFB will treat any value > 0.0 as 1.0.
     */
    bool QueueVibroLevels(const TArray<float>& Levels01);

    /**
     * Queue a command to set the (continuous) vibration level at a specific location to a set amplitude.
     *
     * @param Location
     * @param Level01 Value will be clamped between [0...1], where 0.0f means no vibration, and 1.0 means full
     * vibration.
     */
    bool QueueVibroLevel(ESGHapticLocation Location, float Level01);

    /**
     * Returns true if the chosen glove supports active contact feedback on the Wrist.
     */
    bool SupportsWristSqueeze() const;

    /**
     * Queue a command to set the amount of squeeze level (a.k.a. squeeze-feedback) to the desired level
     * (0 = no squeeze, 1 = full squeeze) on the wrist, and optionally send it right away.
     *
     * @param SqueezeLevel01
     * @param bSendImmediate
     */
    bool QueueWristSqueeze(float SqueezeLevel01, bool bSendImmediate);

The same set of functions are also exposed to Blueprint:

SGHapticsComponent - Blueprint functions

SGHapticsComponent - Blueprint functions

Quick Blueprint Functions Reference

Here is a brief at-a-glance reference of all SGHapticsComponent Blueprint functions related to haptic feedback.

Stop Haptics

Stops all active haptic effects currently playing on the glove.

This includes:

  • Vibrations.
  • Force-feedback (FFB).
  • Wrist-squeeze.
  • Any queued but unsent haptic commands.

SGHapticsComponent - Blueprint function: Stop Haptics

Typical Use Cases:

  • Resetting the glove at the end of a simulation.
  • Restarting a level.
  • Emergency stop logic.
  • Cleaning up when disabling an actor.

Returns:

This Blueprint node does not return a value.

Stop Vibrations

Stops only vibration feedback, without affecting:

  • Force-feedback
  • Wrist-squeeze

SGHapticsComponent - Blueprint function: Stop Vibrations

Typical Use Cases:

It is useful for example if you want to keep finger resistance active while stopping tactile feedback.

Returns:

This Blueprint node does not return a value.

Send Haptics

Compiles all currently queued haptic commands and sends them to the glove.

SGHapticsComponent - Blueprint function: Send Haptics

The component works using a queue-based system:

  1. You queue multiple commands (Force-feedback, Vibro, Wrist, etc..)
  2. You call Send Haptics.
  3. Everything is compiled into one device message.

Returns:

  • true: Indicates message has been successfully sent to SenseCom.
  • false: Failed to send haptics.

Caution

Avoid calling Send Haptics repeatedly in rapid succession.

For optimal performance, queue all required haptic commands first (Force-Feedback, Vibro, Wrist, etc.), then call Send Haptics once per logical update cycle.

Continuously queueing commands and flushing them every frame (or multiple times per frame) increases device communication frequency and computational overhead. It may also cause Bluetooth instability and, in extreme cases, lead to the glove disconnecting.

Instead, batch multiple haptic updates together and send them in a single compiled message whenever possible. This reduces processing cost, lowers communication load, and results in more stable and efficient haptic performance.

Supports Custom Waveform

Checks whether the glove supports custom waveform vibration at a specific location.

SGHapticsComponent - Blueprint function: Supports Custom Waveform

Parameters:

  • At Location: The vibration location to test (e.g., Thumb Tip, Index Tip, Palm Index Side, etc.).

Returns:

  • true: Custom waveform is supported.
  • false: Not supported at this location.

You can call this before using Send Custom Waveform to see if your glove model at the specified location supports vibration.

Send Custom Waveform

Sends a custom vibration waveform to a specific haptic location.

SGHapticsComponent - Blueprint function: Send Custom Waveform

This function has three overloads in C++ and is exposed accordingly in Blueprint.

1) Send a Custom Waveform Asset

Parameters:

  • OutWaveform: A predefined waveform asset that allows you to configure additional custom waveform parameters not available in the other two overloads, giving you more fine-grained control over the vibration’s behavior and timing.
NameUnitRangeDescription
Amplitude0.0 … 1.0Vibration intensity
Start FrequencyHz10 … 500Vibration Frequency at the start of the vibration
End FrequencyHz10 … 500Vibration Frequency at the end of the vibration
Attack Times0.0 … 1.0Time to reach from 0.0 to Amplitude
Sustain Times0.0 … 1.0Time for which the signal will stay at Amplitude
Decay Times0.0 … 1.0Time to reach from Amplitude down to 0.0.
Pause Times0.0 … 1.0Time between each vibration, when repeating the waveform.
Repeat Amount1 .. 100How often the waveform is repeated before stopping.
InfiniteTrue / FalseIf true, the glove will keep playing this waveform until a new one is played.
Waveform TypeEWaveType0 .. 5The shape of the waveform: Sine / Square / SawUp / SawDown / Triangle / Noise.
FrequencySwitchTime*0.0 … 1.0At this position in the waveform (0.0 being start, 1.0 being the end), we start multiply the Frequency by FrequencySwitchFactor
FrequencySwitchFactor*1.0 .. 3.0How much to multiply the frequency by, after FrequencySwitchTime has passed.
  • Location: Where to play the waveform.

Returns:

  • true: If command successfully sent.
  • false: If it fails.

2) Send Amplitude + Duration

Parameters:

  • Amplitude: Vibration strength (0.0 – 1.0).
  • Duration: Duration in seconds.
  • Location: Target haptic location.

Returns:

  • true: If command successfully sent.
  • false: If it fails.

3) Send Amplitude + Duration + Frequency

Parameters:

  • Amplitude — Vibration strength (0.0 – 1.0).
  • Duration — Duration in seconds.
  • Frequency — Vibration frequency in Hz.
  • Location — Target haptic location.

Returns:

  • true: If command successfully sent.
  • false: If it fails.

Queue Force Feedback Levels

Queues force-feedback levels for all fingers at once.

SGHapticsComponent - Blueprint function: Queue Force Feedback Levels

Parameters:

  • Levels 01: Array containing the Force-Feedback levels between 0.0 (no FFB) to 1.0 (full FFB); ordered from Thumb → Index → Middle → Ring → Pinky.

Note

Force-feedback value behavior:

  • 0.0 = No resistance.
  • 1.0 = Full resistance.
  • Values < 0.0 are ignored.
  • Devices that only support on/off FFB treat any value > 0.0 as full force.

Returns:

  • true: If queued successfully.
  • false: If it fails.

Queue Force Feedback Level

Queues force-feedback on a particular finger to a specific level.

SGHapticsComponent - Blueprint function: Queue Force Feedback Level

Parameters:

  • Finger: Index of the finger; indexed from Thumb → Index → Middle → Ring → Pinky.
  • Level 01: Value clamped between 0.0 (no FFB) to 1.0 (full FFB).

Note

Force-feedback value behavior:

  • 0.0 = No resistance.
  • 1.0 = Full resistance.
  • Values < 0.0 are ignored.
  • Devices that only support on/off FFB treat any value > 0.0 as full force.

Returns:

  • true: If queued successfully.
  • false: If it fails.

Queue Vibro Levels

Important

Legacy Function – Use Custom Waveforms Instead

Queue Vibro Levels is retained for backward compatibility with older API releases.

Internally, it delegates to Send Custom Waveform, which is the recommended method for applying vibrotactile feedback.

For new projects, prefer Send Custom Waveform, as it provides more fine-grained control over amplitude, frequency, timing, and waveform shaping.

Queues continuous vibrotactile levels for all fingers at once to a set amplitude.

SGHapticsComponent - Blueprint function: Queue Vibro Levels

Parameters:

  • Levels 01: Array containing the vibro levels between 0.0 (no vibration) to 1.0 (full vibration); ordered from Thumb → Index → Middle → Ring → Pinky.

Note

Force-feedback value behavior:

  • 0.0 = No vibration.
  • 1.0 = Full vibration.
  • Values < 0.0 are ignored.

Returns:

  • true: If queued successfully.
  • false: If it fails.

Queue Vibro Level

Important

Legacy Function – Use Custom Waveforms Instead

Queue Vibro Level is retained for backward compatibility with older API releases.

Internally, it delegates to Send Custom Waveform, which is the recommended method for applying vibrotactile feedback.

For new projects, prefer Send Custom Waveform, as it provides more fine-grained control over amplitude, frequency, timing, and waveform shaping.

Queues continuous vibration at a specific location to a set amplitude.

SGHapticsComponent - Blueprint function: Queue Vibro Level

Parameters:

  • Location: Target location to apply vibration.
  • Level01 (float): Value clamped between 0.0 (no vibration) to 1.0 (full vibration).

Note

Force-feedback value behavior:

  • 0.0 = No vibration.
  • 1.0 = Full vibration.
  • Values < 0.0 are ignored.

Returns:

  • true: If queued successfully.
  • false: If it fails.

Supports Wrist Squeeze

Checks if the connected glove supports active wrist-squeeze feedback.

SGHapticsComponent - Blueprint function: Supports Wrist Squeeze

Returns:

  • true: If wrist-squeeze is supported.
  • false: If it's not supported.

Queue Wrist Squeeze

Queues a wrist-squeeze feedback at the desired level, and optionally if chosen, sends it right away.

SGHapticsComponent - Blueprint function: Queue Wrist Squeeze

Parameters:

  • Squeeze Level 01: Value clamped between 0.0 (no squeeze) to 1.0 (full squeeze).
  • Send Immediate If set to true, immediately sends the command, otherwise only queues until Send Haptics function is called.

Note

Wrist-squeeze value behavior:

  • 0.0 = No squeeze.
  • 1.0 = Full squeeze.

Caution

Avoid using Send Immediate unless absolutely necessary.

For optimal performance, queue all haptic commands first and call the Send Haptics function once after all commands are prepared.

Sending commands immediately increases device communication frequency and computational overhead. Batching commands using Send Haptics reduces processing cost and improves performance.

Returns:

  • 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

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:
    • Duration500 ms
    • Amplitude1.0
    • Frequency180.0 Hz (maximum vibration on Nova 2)
  • How to configure additional parameters such as:
    • Wave TypeSquare
    • Repeat Amount10
  • How to send the custom waveform to the glove.

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

Because Send Immediate is enabled, the squeeze is transmitted instantly instead of being queued.

Caution

Avoid using Send Immediate unless absolutely necessary.

For optimal performance, queue all haptic commands first and call the Send Haptics function once after all commands are prepared.

Sending commands immediately increases device communication frequency and computational overhead. Batching commands using Send Haptics reduces processing cost and improves performance.