2. Guide to Connecting Devices and Integrating VRPN Data with UE

MOCUTE-052F Controller

  1. The MOCUTE-052F controller connects to the computer via Bluetooth. To connect the controller, slide the switch on the side of the controller to the GAME position, power it on, and set it to AUTO mode (the default factory setting). Then, on your computer, enable Bluetooth and connect to the controller.

  2. MOCUTE-052F Controller Operation Instructions:

    • Power On: Press and hold the button until the indicator light comes on (about 2 seconds) and the system starts. (Ensure the batteries are installed first.)

    • Power Off: Press and hold the button until the indicator light goes off (about 5 seconds) and the system will turn off. Note: If no wireless device is connected after startup, the system will automatically shut down after 5 minutes; if a wireless device is connected and no operation is performed for 30 minutes, the system will also automatically shut down.

    • Pairing and Connecting: After startup, the LED indicator light will flash and automatically enter wireless pairing mode. Search for the address and name of the joystick (MOCUTE-052F-xxx) and click connect. After a successful connection, the LED indicator light will go off. The next time you start, it will automatically connect to the last paired wireless device.

    • Unpairing: While the device is off, hold the key for more than 8 seconds during startup. The indicator light will flash, indicating that it has entered re-pairing mode and will not automatically connect to the last paired device.

    • Startup Mode: The joystick is set to AUTO mode by default at the factory. Press the power button to start, and the wireless name MOCUTE-x-AUTO will be displayed.

  3. Using the MOCUTE-052F Joystick:

    • If the device cannot be turned on or off due to an abnormal situation, remove and reinstall the batteries.

    • If you cannot connect, press the B+Y+Power buttons to start the joystick. Rotate the joystick two rounds (for calibration) before turning it off. This will restore the factory settings.

    • If pairing is abnormal or the wireless name cannot be found, turn off the joystick. Press the power button for more than 8 seconds until the light flashes, then release. This will cancel and ignore all wireless pairings, allowing you to re-pair the device.


Motion capture settings:

  • Turn on "VRPN" in the software settings, then connect the camera for playback.

Note:

Up to two joysticks can be connected simultaneously for joystick and motion capture connections. Joysticks will be named "joystick1" and "joystick2" based on the order of their connection. Joysticks must be connected to the same computer running the XINGYING software.


Connect VRPN

Note:

Ensure that the XINGYING software is in the play state when using "NOKOVVrpnClient.exe".

  1. Use the test tool "NOKOVVrpnClient.exe" to connect the joysticks. Run "NOKOVVrpnClient.exe" in the "NOKOVVrpnClient" folder. In PowerShell, type .NOKOVVrpnClient.exe joystick1@127.0.0.1, or in Command Prompt, type NOKOVVrpnClient.exe joystick1@127.0.0.1. After pressing the joystick buttons or sliding the joystick wheel, the terminal will display the corresponding relationship and its data. Successful terminal response to the joystick button indicates successful connection with XINGYING.

  2. If two joysticks are connected, change "joystick1" to "joystick2" in the terminal for the second joystick.

  3. Button Corresponding Relationship

  4. Slider Coordinate Description: The coordinate range is 0-65535, with the upper left corner being the starting coordinates of x and y, respectively (0, 0).


Joystick Access to Unreal Engine

  1. Click on "Window > LiveLink", and add "LiveLinkVRPN Source" in the "LiveLink" window. Now, we add the topic for the joystick wheel:

  2. In "Connection Settings", do not modify the "IPAddress"; keep it as default.

  3. The frame rate in "Local Update Rate (Hz)" should be consistent with the frame rate set in the VR Tracker software.

  4. In "Device", enter the name of the joystick you need to connect. For example, if you are connecting the first joystick, enter "joystick1" here.

  5. "Subjectname" represents the subject name; choose "Analog" for "Type".

  6. After all the parameters are set, click "Add". Now, slide the joystick wheel; the wheel's theme will be successfully added below. Select the theme name of the wheel, click "View Options" on the right, choose "Show Frame Data" in the dropdown menu, "Expand Property Values", and the attribute values will change when you slide the joystick wheel.

  7. Adding Button (joystick key position) subject: Please keep the "IPAddress" as default, and the frame rate in "Local Update Rate in Hz" should be consistent with the frame rate set in the VR Tracker software. In "Device", enter the name of the joystick you need to connect. For instance, if you're connecting the first joystick, then enter "joystick1" here. "Subjectname" is for subject naming (please avoid duplicating the wheel topic name), and choose "Button" for "Type" . Click add, then press the joystick button, and the Button topic will be added to the topic list. Select the Button topic, expand the property values, and now when you press the corresponding key, "Property Value 0" will display the number of the key that's pressed. When the key is pressed, the number of "Property Values" will change from 0 to 1.


Create a Blueprint Class

  1. Right-click in the Content Browser to create a Blueprint class. Choose to create an "Actor" Blueprint class. Double-click on this "Actor" Blueprint, then add various nodes in "My Blueprint → Event Tick." Please note, after adding the two nodes of "Calculate Live Links, " select "Button Theme Name" and "Roulette Theme Name" respectively in the "Object" of this node."

  2. After adding each node, click on "Compile" and "Save."


Using the Controller in the UE scene

  • Drag the "Actor" Blueprint class from the Content Browser into the UE scene, then click on play. Now, by sliding the controller wheel or pressing different keys, the UE scene will display the button number, status, and coordinates.


Xbox 360 Controller

  1. The Xbox 360 controller connects to a computer through a USB cable. Insert the USB cable of the Xbox 360 controller into the computer where the XINGYING software is installed. The button mapping for the Xbox 360 controller is as follows:

  2. The use of the Xbox 360 controller is identical to that of the MOCUTE-052F controller. For specific operating instructions, please refer to "Section XVII: Controller Connection Instructions and VRPN Data Integration into UE Instructions, " steps four to eight.