UE5 Plugin Tutorial of Controllers (For V1.3.1 and Above)
1. Reference for Example Levels
Example Level Name:
Level_UdxHandControl
Only provided for testing and reference.
2. Creating a Character Blueprint
2.1. Creating a New Blueprint Inherited from the Pawn/Character Base Class
Create a New Blueprint
Base Class:
Pawn/Character


Add the Joystick Event Receiving Component
HandControlInput
(v1.3.1 version:HandJoystick
, The same applies below.)
Component Settings

JoystickDeadZone
float
0.15
Joystick dead zone. When the value is between ±0.15, the associated events will not be triggered. The range is 0~1.
Hand Rocker Switch
bool
true
Enables all joystick events. When turned off, the joystick events for both hands will not be enabled.
Hand Rocker Switch L
bool
true
Enables left-hand joystick events. Needs to enable all joystick events first.
Hand Rocker Switch R
bool
true
Enables right-hand joystick events. Needs to enable all joystick events first.
TrackPadValue
float
30
TrackPad gesture trigger threshold. Range: 0~60
GripValue
float
50
Grip gesture trigger threshold. Range: 0~80
TriggerValue
float
25
Trigger gesture trigger threshold. Range: 0~100
Initialize HandControlInput Component
Initialize by calling the function
InitHandControlInput
to load the HandComponent.

Add Vibration Feedback Functionality
It needs to trigger the vibration feedback function
CallVibration
by calling the componentHandControlInput
at the corresponding location in the blueprint. Here, a method to obtain theCharName
fromLiveLink
is provided.

Add joystick trigger events
By adding joystick events through the component
HandControlInput
, custom logic can be implemented.


3. Function/Event Definitions
3.1. CallVibration
Function Description: Sends vibration data to the HandDriver software.
RemoteIP
FString
127.0.0.1
The IP address of the computer where the HandDriver software is located. Use the local IP 127.0.0.1 if it is on the same computer.
CharName
Fstring
None
Enter the data source name set in LiveLink, which is used to identify the character.
HandType
Enum
Left
The joystick vibrator on which hand (Left/Right).
Vibrators
Enum
AllOff
The sequence number of the activated vibrator (AllOff: None, Vib1: 1, Vib2: 2, AllOn: All).
Duration
float
1
The activation time of the vibrator (0.04s-2.5s).
Amplitude
uint8
10
The vibration intensity of the vibrator (the range is 4-10).
Return Value: Returns the data sent this time to verify the data format.

3.2. MoveForwardEvent
Function Description: Receives the Y-axis data of the left-hand joystick.
Value
float
-1~1
Returns the Y value of the left-hand joystick.

3.3. MoveRightEvent
Function Description: Receives the X-axis data of the left-hand joystick.
Value
float
-1~1
Returns the X value of the left-hand joystick.

3.4. LookUpEvent
Function Description: Receives the Y-axis data of the right-hand joystick.
Value
float
-1~1
Returns the Y value of the right-hand joystick.

3.5. TurnEvent
Function Description: Receives the X-axis data of the right-hand joystick.
Value
float
-1~1
Returns the X value of the right-hand joystick.

3.6. ButtonA_L/REvent
Function Description: Triggered when the A button on the left/right hand is pressed.
Return Value: None


3.7. ButtonB_L/REvent
Function Description: Triggered when the B button on the left/right hand is pressed.
Return Value: None


3.8. ButtonMenu_L/REvent
Function Description: Triggered when the A+B buttons on the left/right hand are pressed simultaneously.
Return Value: None


3.9. ButtonJoy_L/REvent
Function Description: Triggered when the joystick button on the left/right hand is pressed.
Return Value: None


3.10. TrackPad_L/REvent
Function Description: Called when the TrackPad gesture is triggered on the left/right hand.
Return Value: None


3.11. UnTrackPad_L/REvent
Function Description: Called when the left/right hand releases the TrackPad gesture.
Return Value: None


3.12. Grip_L/REvent
Function Description: Called when the left/right hand triggers the Grip gesture..
Return Value: None


3.13. UnGrip_L/REvent
Function Description: Called when the left/right hand releases the Grip gesture. Return Value: None


3.14. Trigger_L/REvent
Function Description: Called when the Trigger gesture is triggered on the left/right hand.
Return Value: None


3.15. UnTrigger_L/REvent
Function Description: Called when the left/right hand releases the Trigger gesture. Return Value: None


4. FAQ
4.1. When Menu is triggered by pressing A+B, A or B is fired first
Answer: Introduce two boolean flags to track whether the Menu key is being held. Set the flag to true when Menu is pressed and back to false when the action finishes. Add a check for this flag in the A/B handlers so they only proceed when the Menu key is not active.

Last updated