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
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.
Type | Name | Description |
---|
exec | In | |
String | Event Id | Name of haptic event which you want to play. |
Outputs
Type | Name | Description |
---|
exec | Out | |
Integer | Return Value | Request ID. You can use the request ID to stop the haptic. It returns -1 if the return fails. |
Play Haptic With Option
Play haptic event, with adjusting the strength, duration, and direction of the haptic.
Type | Name | Description |
---|
exec | In | |
String | Event Id | Name of haptic event which you want to play. |
Float | Intensity | The haptic intensity is multiplied by this value. |
Float | Duration | The haptic duration is multiplied by this value. |
Float | Angle X | Rotate haptic counterclockwise around the global Vector3.up. Valid range is: [0.0f - 360.0f] |
Float | Offset Y | Move haptic up or down. Valid range is: [-0.5f - 0.5f] |
Outputs
Type | Name | Description |
---|
exec | Out | |
Integer | Return Value | Request ID. You can use the request ID to stop the haptic. It returns -1 if the return fails. |
Play Loop
Play the haptic repeatedly. Additionally, like the function PlayHapticWithOption
, you can adjust the strength, duration, and direction of the haptic.
Type | Name | Description |
---|
exec | In | |
String | Event Id | Name of haptic event which you want to play. |
Float | Intensity | The haptic intensity is multiplied by this value. |
Float | Duration | The haptic duration is multiplied by this value. |
Float | Angle X | Rotate haptic counterclockwise around the global Vector3.up. Valid range is: [0.0f - 360.0f] |
Float | Offset Y | Move haptic up or down. Valid range is: [-0.5f - 0.5f] |
Integer | Interval | The time interval between loops, measured in milliseconds. |
Integer | Max Count | The number of loops. |
Outputs
Type | Name | Description |
---|
exec | Out | |
Integer | Return Value | Request 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
Play haptic feedback on the specific haptic actuator. You can use this function without creating an event.
Type | Name | Description |
---|
exec | In | |
Integer | Position | Type of haptic device. |
Array of Integers | Motor Values | Assign 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] |
Float | Seconds | The duration of haptic, measured in second. Greater than or equal to 0.1f is recommended. |
-
Position
Value | Device |
---|
0 | TactSuit |
1 | Tactosy for Arms(Left) |
2 | Tactosy for Arms(Right) |
3 | TactVisor |
4 | Tactosy for Hands(Left) |
5 | Tactosy for Hands(Right) |
6 | Tactosy for Feet(Left) |
7 | Tactosy for Feet(Right) |
8 | TactGlove(Left) |
9 | TactGlove(Right) |
Outputs
Type | Name | Description |
---|
exec | Out | |
Integer | Return Value | Request ID. You can use the request ID to stop the haptic. It returns -1 if the return fails. |
Play Path
Play haptic around specific coordinates. See C++ API Reference for more information.
Type | Name | Description |
---|
exec | In | |
Integer | Position | Type of haptic device. |
Array of Floats | X | Assign X coordinate. Valid range for each value in the array is: [0.0f - 1.0f] |
Array of Floats | Y | Assign Y coordinate. Valid range for each value in the array is: [0.0f - 1.0f] |
Array of Integers | Motor Values | Assign 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] |
Float | Seconds | The duration of haptic, measured in second. Greater than or equal to 0.1f is recommended. |
-
Position
Value | Device |
---|
0 | TactSuit |
1 | Tactosy for Arms(Left) |
2 | Tactosy for Arms(Right) |
3 | TactVisor |
4 | Tactosy for Hands(Left) |
5 | Tactosy for Hands(Right) |
6 | Tactosy for Feet(Left) |
7 | Tactosy for Feet(Right) |
8 | TactGlove(Left) |
9 | TactGlove(Right) |
Outputs
Type | Name | Description |
---|
exec | Out | |
Integer | Return Value | Request ID. You can use the request ID to stop the haptic. It returns -1 if the return fails. |
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.
Type | Name | Description |
---|
exec | In | |
Integer | Position | Type of haptic device. |
Array of Integers | Motor Intensities | An 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 Enums | Play Time Values | An array consisting of six elements, each representing a time interval for actuation, with time defined using EBhapticsGlovePlayTime enums. |
Array of EBhapticsGloveShapeValue Enums | Shape Values | An array consisting of six elements, each representing the forms of haptic intensity changes over time, specified by the EBhapticsGloveShapeValue enums. |
-
Position
Value | Device |
---|
8 | TactGlove(Left) |
9 | TactGlove(Right) |
-
Motor Intensities
Array Index | Motor is positioned at… |
---|
0 | Tip of the thumb |
1 | Tip of the index finger |
2 | Tip of the middle finger |
3 | Tip of the ring finger |
4 | Tip of the little finger |
5 | On the wrist |
-
Play Time Values
Value | Duration | Same as… |
---|
EBhapticsGlovePlayTime::None | None | 0 |
EBhapticsGlovePlayTime::FiveMS | 5ms | 1 |
EBhapticsGlovePlayTime::TenMS | 10ms | 2 |
EBhapticsGlovePlayTime::TwentyMS | 20ms | 4 |
EBhapticsGlovePlayTime::ThirtyMS | 30ms | 6 |
EBhapticsGlovePlayTime::FortyMS | 40ms | 8 |
-
Shape Values
Value | Waveform | Same as… |
---|
EBhapticsGloveShapeValue::Constant | Constant intensity for the duration | 0 |
EBhapticsGloveShapeValue::Decreasing | Starts at the specified intensity and decreases by half | 1 |
EBhapticsGloveShapeValue::Increasing | Starts at half of the specified intensity and increases to the specified one. | 2 |
Outputs
Type | Name | Description |
---|
exec | Out | |
Integer | Return Value | Request 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
Stop the haptic event by Event ID. Returns whether the stop was successful.
Type | Name | Description |
---|
exec | In | |
String | Event Id | Name of haptic event which you want to stop. |
Outputs
Type | Name | Description |
---|
exec | Out | |
Boolean | Return Value | Whether the stop was successful. |
Stop Haptic By Request Id
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.
Type | Name | Description |
---|
exec | In | |
Integer | Request Id | Request ID of playing haptic event which you want to stop. |
Outputs
Type | Name | Description |
---|
exec | Out | |
Boolean | Return Value | Whether the stop was successful. |
Stop Haptic
Stops all haptic currently playing. Returns whether the stop was successful.
Type | Name | Description |
---|
exec | In | |
Outputs
Type | Name | Description |
---|
exec | Out | |
Boolean | Return Value | Whether the stop was successful. |
Is Playing
Check if the haptic is playing.
Type | Name | Description |
---|
exec | In | |
Outputs
Type | Name | Description |
---|
exec | Out | |
Boolean | Return Value | Whether the event is playing. |
Is Playing By Event Id
Check if the haptic event for this Event ID is playing.
Type | Name | Description |
---|
exec | In | |
String | Event Id | Name of haptic event to check if it is currently playing. |
Outputs
Type | Name | Description |
---|
exec | Out | |
Boolean | Return Value | Whether the event is playing. |
Is Playing By Request Id
Check if the haptic event for this Request ID is playing.
Type | Name | Description |
---|
exec | In | |
Integer | Request Id | Request ID of haptic event to check if it is currently playing. |
Outputs
Type | Name | Description |
---|
exec | Out | |
Boolean | Return Value | Whether the event is playing. |
Initialize bHaptics
Initialize the haptic environment. This function should be called before using the haptic-related functions.
Type | Name | Description |
---|
exec | In | |
Outputs
Type | Name | Description |
---|
exec | Out | |
Ping
Send simple haptic feedback to certain device.
Type | Name | Description |
---|
exec | In | |
Bhaptics Device Structure | Device | Device you want to send ping. |
Outputs
Type | Name | Description |
---|
exec | Out | |
Ping All
Send simple haptic feedback to all connected devices.
Type | Name | Description |
---|
exec | In | |
Outputs
Type | Name | Description |
---|
exec | Out | |
Destroy bHaptics
Destroy the haptic environment. This function must be called when game ends, and called ONLY ONCE.
Type | Name | Description |
---|
exec | In | |
Outputs
Type | Name | Description |
---|
exec | Out | |
Get bHaptics devices
Get an array of connected haptic devices' info.
Type | Name | Description |
---|
exec | In | |
Outputs
Type | Name | Description |
---|
exec | Out | |
Array of Bhaptics Device Structures | Return Value | List of devices. |
Is bHaptics Available
Check if the haptic environment is initialized, and ready to use haptic-related functions.
Type | Name | Description |
---|
exec | In | |
Outputs
Type | Name | Description |
---|
exec | Out | |
Boolean | Return Value | Whether the bHaptics environment is available. |
Project To Vest With Player Collision Object
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.
Type | Name | Description |
---|
Vector | Contact Loaction | Contact point in global coordinates. |
Primitive Component Object Reference | Player Component | Reference to the primitive component attached to the player. |
Float | Half Height | The half value of the player's actual height, measured in centimeter. |
Outputs
Type | Name | Description |
---|
Bhaptics Rotation Option Structure | Return Value | Offset values. |
Project To Vest With Player Location/Position
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.
Type | Name | Description |
---|
Vector | Contact Location | Contact point in global coordinates. |
Vector | Player Location | Location of the player. |
Rotator | Player Rotation | Rotation of the player. |
Outputs
Type | Name | Description |
---|
Bhaptics Rotation Option Structure | Return Value | Offset values. |
Custom Project To Vest
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.
Type | Name | Description |
---|
Vector | Contact Loaction | Contact point in global coordinates. |
Primitive Component Object Reference | Player Component | Reference to the primitive component attached to the player. |
Float | Half Height | The half value of the player's actual height, measured in centimeter. |
Vector | Up Vector | The reference upward direction vector for offset calculation. |
Vector | Forward Vector | The reference forward direction vector for offset calculation. |
Outputs
Type | Name | Description |
---|
Bhaptics Rotation Option Structure | Return Value | Offset values. |