UE5 Plugin Tutorial of Controllers (Only for V1.3.0)
1. Example Levels for Reference
-
Example Level Name:
Level_UdxJoystick - The example is for testing and reference.
2. Creating a Blueprint with Joystick Functionality
2.1. Create a Blueprint Derived from the UdxPawn Base Class
- Create a New Blueprint
-
Base Class:
UdxPawn
{% column width="58.333333333333336%" %}


- Add Joystick Events
- Override joystick events to implement custom logic.


- Add Vibration Feedback
- Call the
CallJoystickVibrationfunction in the appropriate blueprint locations to trigger vibration feedback.

3. Function/Event Definitions
3.1. CallJoystickVibration
Purpose: Sends vibration data to the HandDriver software.
| Parameter Name | Type | Example Value | Description |
|---|---|---|---|
| RemoteIP | FString | 127.0.0.1 | IP address of the computer running HandDriver. Use 127.0.0.1 for local testing. |
| CharName | Fstring | N/A | Data source name in LiveLink, used to identify the character. |
| HandType | Enum | Left | Specifies which hand's joystick vibrators to activate (Left/Right). |
| Vibrators | uint8 | 0 | Specifies the vibrator index (0: None, 1: Vib1, 2: Vib2, 3: All). |
| Duration | float | 0.04 | Activation duration (0.04 second - 2.5 seconds). |
| Amplitude | uint8 | 4 | Vibration strength (range: 4-10). |
Return Value: Returns the sent data for validation purposes.

3.2. UdxMoveForward
Purpose: Receives Y-axis data from the left-hand joystick.
| Parameter Name | Type | Rang | Description |
|---|---|---|---|
| UdxValue | float | -1~1 | Y-axis value of the left joystick. |

3.3. UdxMoveRight
Purpose: Receives X-axis data from the left-hand joystick.
| Parameter Name | Type | Range | Description |
|---|---|---|---|
| UdxValue | float | -1~1 | X-axis value of the left joystick. |

3.4. UdxLookUp
Purpose: Receives Y-axis data from the right-hand joystick.
| Parameter Name | Type | Range | Description |
|---|---|---|---|
| UdxValue | float | -1~1 | Y-axis value of the right joystick. |

3.5. UdxTurnRight
Purpose: Receives X-axis data from the right-hand joystick.
| Parameter Name | Type | Range | Description |
|---|---|---|---|
| UdxValue | float | -1~1 | X-axis value of the right joystick. |

3.6. UdxButtonA_L/R
Purpose: Triggered when the A button on the left or right hand is pressed.
Return Value: None.

3.7. UdxButtonB_L/R
Purpose: Triggered when the B button on the left or right hand is pressed.
Return Value: None.

3.8. UdxButtonJoy_L/R
Purpose: Triggered when the joystick button on the left or right hand is pressed.
Return Value: None.

3.9. UdxButtonMenu_L/R
Purpose: Triggered when both A and B buttons on the left or right hand are pressed simultaneously.
Return Value: None.
