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 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: [1 - 100]
FloatSecondsThe duration of haptic, measured in second. Greater than or equal to 0.1f is recommended.
  • Position

    ValueDevice
    0TactSuit
    1Tactosy for Arms(Left)
    2Tactosy for Arms(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.

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: [1 - 100]
FloatSecondsThe duration of haptic, measured in second. Greater than or equal to 0.1f is recommended.
  • Position

    ValueDevice
    0TactSuit
    1Tactosy for Arms(Left)
    2Tactosy for Arms(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 elements, and at least one element is required to work.

Inputs

TypeNameDescription
execIn
IntegerPositionType of haptic device.
Array of IntegersMotor IntensitiesAn array consisting of six elements, each representing the intensity of a motor. The array must have a length of six, as there are six motors in one TactGlove. Valid range for each value in the array is: [1 - 100]
Array of EBhapticsGlovePlayTime EnumsPlay Time ValuesAn array consisting of six elements, each representing a time interval for actuation, with time defined using EBhapticsGlovePlayTime enums.
Array of EBhapticsGloveShapeValue EnumsShape ValuesAn array consisting of six elements, each representing the forms of haptic intensity changes over time, specified by the EBhapticsGloveShapeValue enums.
  • 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
  • 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.

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