Skip to main content

Blueprints

Generated from UBhapticsSDK2.

Targets of all nodes are "Bhaptics SDK2".


Functions for Playing Event-driven Haptic​

Play the haptic patterns bound to specific haptic event made from Designer/Portal. We highly recommend to use these functions.

Play Haptic​

Untitled

Play the haptic event. It is the most basic way to call a haptic event. It has the lowest overhead of any haptic event-calling function.

Inputs​

TypeNameDescription
execIn
StringEvent IdName of haptic event which you want to play.

Outputs​

TypeNameDescription
execOut
IntegerReturn ValueRequest ID. You can use the request ID to stop the haptic. It returns -1 if the return fails.

Play Haptic With Option​

Untitled

Play haptic event, with adjusting the strength, duration, and direction of the haptic.

Inputs​

TypeNameDescription
execIn
StringEvent IdName of haptic event which you want to play.
FloatIntensityThe haptic intensity is multiplied by this value.
FloatDurationThe haptic duration is multiplied by this value.
FloatAngle XRotate haptic counterclockwise around the global Vector3.up. Valid range is: [0.0f - 360.0f]
FloatOffset YMove haptic up or down. Valid range is: [-0.5f - 0.5f]

Outputs​

TypeNameDescription
execOut
IntegerReturn ValueRequest ID. You can use the request ID to stop the haptic. It returns -1 if the return fails.

Play Haptic With StartTime​

Play Haptic With StartTime

Play haptic event from a given start position, with adjusting the strength, duration, and direction of the haptic.

Inputs​

TypeNameDescription
execIn
StringEvent IdName of haptic event which you want to play.
IntegerStart MillisPlayback start position in milliseconds. The first Start Millis milliseconds of the event are skipped (this is a start offset, not a delay before playback). Windows/macOS/Android only.
FloatIntensityThe haptic intensity is multiplied by this value.
FloatDurationThe haptic duration is multiplied by this value.
FloatAngle XRotate haptic counterclockwise around the global Vector3.up. Valid range is: [0.0f - 360.0f]
FloatOffset YMove haptic up or down. Valid range is: [-0.5f - 0.5f]

Outputs​

TypeNameDescription
execOut
IntegerReturn ValueRequest ID. You can use the request ID to stop the haptic. It returns -1 if the return fails.

Play Loop​

Untitled

Play the haptic repeatedly. Additionally, like the function PlayHapticWithOption, you can adjust the strength, duration, and direction of the haptic.

Inputs​

TypeNameDescription
execIn
StringEvent IdName of haptic event which you want to play.
FloatIntensityThe haptic intensity is multiplied by this value.
FloatDurationThe haptic duration is multiplied by this value.
FloatAngle XRotate haptic counterclockwise around the global Vector3.up. Valid range is: [0.0f - 360.0f]
FloatOffset YMove haptic up or down. Valid range is: [-0.5f - 0.5f]
IntegerIntervalThe time interval between loops, measured in milliseconds.
IntegerMax CountThe number of loops.

Outputs​

TypeNameDescription
execOut
IntegerReturn ValueRequest ID. You can use the request ID to stop the haptic. It returns -1 if the return fails.

Functions for Playing Haptic Directly​

If you want to play haptics without creating a new event, use these functions.

Play Dot​

Untitled

Play haptic feedback on the specific haptic actuator. You can use this function without creating an event.

Inputs​

TypeNameDescription
execIn
IntegerPositionType of haptic device.
Array of IntegersMotor ValuesAssign the length of the array by the number of motors for device. Values in the array means motors' intensity. Valid range for each value in the array is: [0 - 100]
FloatSecondsThe duration of haptic, measured in second. Greater than or equal to 0.1f is recommended.
  • Position

    ValueDevice
    0TactSuit Pro
    1TactSleeve(Left)
    2TactSleeve(Right)
    3TactVisor
    4Tactosy for Hands(Left)
    5Tactosy for Hands(Right)
    6Tactosy for Feet(Left)
    7Tactosy for Feet(Right)
    8TactGlove(Left)
    9TactGlove(Right)

Outputs​

TypeNameDescription
execOut
IntegerReturn ValueRequest ID. You can use the request ID to stop the haptic. It returns -1 if the return fails.

Play Path​

Untitled

Play haptic around specific coordinates. See C++ API Reference for more information.

[TactGlove DK3] Play Path does not drive the wrist voice-coil motor (VCM) on a DK3 glove.

Inputs​

TypeNameDescription
execIn
IntegerPositionType of haptic device.
Array of FloatsXAssign X coordinate. Valid range for each value in the array is: [0.0f - 1.0f]
Array of FloatsYAssign Y coordinate. Valid range for each value in the array is: [0.0f - 1.0f]
Array of IntegersMotor ValuesAssign the length of the array by the number of motors for device. Values in the array means motors' intensity. Valid range for each value in the array is: [0 - 100]
FloatSecondsThe duration of haptic, measured in second. Greater than or equal to 0.1f is recommended.
  • Position

    ValueDevice
    0TactSuit Pro
    1TactSleeve(Left)
    2TactSleeve(Right)
    3TactVisor
    4Tactosy for Hands(Left)
    5Tactosy for Hands(Right)
    6Tactosy for Feet(Left)
    7Tactosy for Feet(Right)
    8TactGlove(Left)
    9TactGlove(Right)

Outputs​

TypeNameDescription
execOut
IntegerReturn ValueRequest ID. You can use the request ID to stop the haptic. It returns -1 if the return fails.

Play Waveform​

Untitled

TactGlove Only. Play haptics in TactGlove. Unlike using "Play Dot", you can finely adjust haptic duration and vibration intensity changes. This allows for even finer expression of haptic feedback.

Each array must have six (TactGlove DK2) or eight (TactGlove DK3) elements, and all three arrays must have the same length.

Inputs​

TypeNameDescription
execIn
IntegerPositionType of haptic device.
Array of IntegersMotor IntensitiesAn array of motor intensities. Its length must match the number of motors in the TactGlove: six (TactGlove DK2) or eight (TactGlove DK3). Valid range for each value in the array is: [0 - 100]
Array of EBhapticsGlovePlayTime EnumsPlay Time ValuesAn array with the same length as Motor Intensities (six for DK2, eight for DK3), each representing a time interval for actuation, with time defined using EBhapticsGlovePlayTime enums.
Array of EBhapticsGloveShapeValue EnumsShape ValuesAn array with the same length as Motor Intensities (six for DK2, eight for DK3), each representing the forms of haptic intensity changes over time, specified by the EBhapticsGloveShapeValue enums.
IntegerFrequency[TactGlove DK3 only] Vibration frequency in Hz of the DK3 glove's own actuators. The default is 80. It has no effect on DK2 gloves or on the universal (non-Windows/macOS) path. Windows/macOS only.
IntegerRepeat CountNumber of times to repeat the waveform, from 1. 0 plays it once. Windows/macOS only.
  • Position

    ValueDevice
    8TactGlove(Left)
    9TactGlove(Right)
  • Motor Intensities

    Array IndexMotor is positioned at…
    0Tip of the thumb
    1Tip of the index finger
    2Tip of the middle finger
    3Tip of the ring finger
    4Tip of the little finger
    5On the wrist
    6On the palm (thumb side)
    7On the palm (little finger side)
  • Play Time Values

    ValueDurationSame as…
    EBhapticsGlovePlayTime::NoneNone0
    EBhapticsGlovePlayTime::FiveMS5ms1
    EBhapticsGlovePlayTime::TenMS10ms2
    EBhapticsGlovePlayTime::TwentyMS20ms4
    EBhapticsGlovePlayTime::ThirtyMS30ms6
    EBhapticsGlovePlayTime::FortyMS40ms8
  • Shape Values

    ValueWaveformSame as…
    EBhapticsGloveShapeValue::ConstantConstant intensity for the duration0
    EBhapticsGloveShapeValue::DecreasingStarts at the specified intensity and decreases by half1
    EBhapticsGloveShapeValue::IncreasingStarts at half of the specified intensity and increases to the specified one.2

Outputs​

TypeNameDescription
execOut
IntegerReturn ValueRequest ID. You can use the request ID to stop the haptic. It returns -1 if the return fails.

The Other Functions​

Stop Haptic By Event Id​

Untitled

Stop the haptic event by Event ID. Returns whether the stop was successful.

Inputs​

TypeNameDescription
execIn
StringEvent IdName of haptic event which you want to stop.

Outputs​

TypeNameDescription
execOut
BooleanReturn ValueWhether the stop was successful.

Stop Haptic By Request Id​

Untitled

Stop the Haptic Event by using the Request ID from the return of the function that executes the haptic. Returns whether the stop was successful.

Inputs​

TypeNameDescription
execIn
IntegerRequest IdRequest ID of playing haptic event which you want to stop.

Outputs​

TypeNameDescription
execOut
BooleanReturn ValueWhether the stop was successful.

Stop Haptic​

Untitled

Stops all haptic currently playing. Returns whether the stop was successful.

Inputs​

TypeNameDescription
execIn

Outputs​

TypeNameDescription
execOut
BooleanReturn ValueWhether the stop was successful.

Pause Haptic By Event Id​

Pause Haptic By Event Id

Pause the haptic event by Event ID. The playback position is held so it can be continued later with "Resume Haptic By Event Id".

Inputs​

TypeNameDescription
execIn
StringEvent IdName of haptic event which you want to pause.

Outputs​

TypeNameDescription
execOut

Resume Haptic By Event Id​

Resume Haptic By Event Id

Resume a haptic event previously paused with "Pause Haptic By Event Id", continuing from the position where it was paused.

Inputs​

TypeNameDescription
execIn
StringEvent IdName of haptic event which you want to resume.

Outputs​

TypeNameDescription

Is Playing​

Untitled

Check if the haptic is playing.

Inputs​

TypeNameDescription
execIn

Outputs​

TypeNameDescription
execOut
BooleanReturn ValueWhether the event is playing.

Is Playing By Event Id​

Untitled

Check if the haptic event for this Event ID is playing.

Inputs​

TypeNameDescription
execIn
StringEvent IdName of haptic event to check if it is currently playing.

Outputs​

TypeNameDescription
execOut
BooleanReturn ValueWhether the event is playing.

Is Playing By Request Id​

Untitled

Check if the haptic event for this Request ID is playing.

Inputs​

TypeNameDescription
execIn
IntegerRequest IdRequest ID of haptic event to check if it is currently playing.

Outputs​

TypeNameDescription
execOut
BooleanReturn ValueWhether the event is playing.

Initialize bHaptics​

Untitled

Initialize the haptic environment. This function should be called before using the haptic-related functions.

Inputs​

TypeNameDescription
execIn

Outputs​

TypeNameDescription
execOut

Ping​

Untitled

Send simple haptic feedback to certain device.

Inputs​

TypeNameDescription
execIn
Bhaptics Device StructureDeviceDevice you want to send ping.

Outputs​

TypeNameDescription
execOut

Ping All​

Untitled

Send simple haptic feedback to all connected devices.

Inputs​

TypeNameDescription
execIn

Outputs​

TypeNameDescription
execOut

Destroy bHaptics​

Untitled

Destroy the haptic environment. This function must be called when game ends, and called ONLY ONCE.

Inputs​

TypeNameDescription
execIn

Outputs​

TypeNameDescription
execOut

Get bHaptics devices​

Untitled

Get an array of connected haptic devices' info.

Inputs​

TypeNameDescription
execIn

Outputs​

TypeNameDescription
execOut
Array of Bhaptics Device StructuresReturn ValueList of devices.

Is bHaptics Available​

Untitled

Check if the haptic environment is initialized, and ready to use haptic-related functions.

Inputs​

TypeNameDescription
execIn

Outputs​

TypeNameDescription
execOut
BooleanReturn ValueWhether the bHaptics environment is available.

Project To Vest With Player Collision Object​

Untitled

Helper function to compute the offset values (angle and height) of a given collision contact point from the player. These offset values can be used in PlayHapticWithOption and PlayLoop which can adjust the haptic position.

This function assumes that the forward direction aligns with the front of the vest, and the player's position is considered as the origin.

See C++ API Reference for more information.

Inputs​

TypeNameDescription
VectorContact LocationContact point in global coordinates.
Primitive Component Object ReferencePlayer ComponentReference to the primitive component attached to the player.
FloatHalf HeightThe half value of the player's actual height, measured in centimeter.

Outputs​

TypeNameDescription
Bhaptics Rotation Option StructureReturn ValueOffset values.

Project To Vest With Player Location/Position​

Untitled

Helper function to compute offset values from a contact location and player transform information. It's similar to "Project To Vest", but it only calculates the angle offset(Offset Angle X). The height(Offset Y) will always be 0.

Inputs​

TypeNameDescription
VectorContact LocationContact point in global coordinates.
VectorPlayer LocationLocation of the player.
RotatorPlayer RotationRotation of the player.

Outputs​

TypeNameDescription
Bhaptics Rotation Option StructureReturn ValueOffset values.

Custom Project To Vest​

Untitled

Helper function to compute offset values from collision. Performs the same function as "Project To Vest", but allows the Forward and Up vectors to be changed.

Inputs​

TypeNameDescription
VectorContact LocationContact point in global coordinates.
Primitive Component Object ReferencePlayer ComponentReference to the primitive component attached to the player.
FloatHalf HeightThe half value of the player's actual height, measured in centimeter.
VectorUp VectorThe reference upward direction vector for offset calculation.
VectorForward VectorThe reference forward direction vector for offset calculation.

Outputs​

TypeNameDescription
Bhaptics Rotation Option StructureReturn ValueOffset values.