[Untitled] UE4 connects to vr external devices

UE4VR Instructions
Software: UE4.26, SteamVR (1.22.13)
Hardware: HTC VIVE PRO 2.0
-SteamVR (1.22.13) installation
Download and install SteamVR (1.22.13) on steam. If the version of SteamVR and UE4 are too different, the VR device may not be able to recognize the UE4 project. The language of SteamVR needs to be changed in the steam settings.
2. HTC VIVE device connection
1. After planning the VR area, install the locator. If you want to get the best positioning effect, please install the locator in the following way.
Install the locator at the opposite corner, higher than your head, preferably more than 2 meters. Fix the locator at a position that is not easy to be bumped or moved. Each locator has a field of view of 120 degrees, and it is recommended to install it with a downward slope of 30 to 45 degrees to completely cover your play area. For best tracking, keep the two locators within 5 meters of each other.
insert image description here

Figure 1 The installation of VR play area and locator. The blue dotted frame is the VR play area, and the red cube is the locator
2. Make sure that the headset is connected to the computer through the streaming box, and ensure that the output interface is connected to the computer graphics card.
3. Run SteamVR, (if the VR external device is connected normally, SteamVR will display five green icons, as shown in Figure 2) Click the menu button in the upper left corner, select "Room Settings" (as shown in Figure 3), and then follow the prompts to set up the header step by step The positional relationship between the wearable display and the locator.
insert image description here

Figure 2 SteamVR device indicator icon
insert image description here

Figure 3 Room settings in SteamVR
4. Click the menu button in the upper left corner, select "Developer" → "Developer Settings" (as shown in Figure 4), and click to enable "Direct Display Mode" (as shown in Figure 5).
insert image description here

Figure 4 Developer Settings
insert image description here

Figure 5 Enable direct display mode
3. Run the VR project in UE4
The first-person game project template of UE4 contains the running code in the VR environment, so use this template to explain the various settings required to run in the VR environment.
1. Open UE4, select "New Project" → "Game" → "First Person Game" and create a template, as shown in Figure 6.
insert image description here

Figure 6 First-person game template
2. After the project is loaded, you need to set the plug-in. Click "Edit" → "Plug-in" as shown in Figure 7, then search for the plug-in SteamVR and Simple HMD plug-in in the search box in the upper right corner of the plug-in interface in Figure 8 and click "activated". It should be noted that after clicking to enable the plug-in, UE4 needs to be restarted before the plug-in can take effect.
insert image description here

Figure 7 Edit plugin
insert image description here

Figure 8 Load plug-in
3, VR controller mapping, you can adjust the button mapping of the VR controller in "Edit" → "Project Settings" → "Engine" → "Input" → "Operation Mapping", as shown in Figure 9.
insert image description here
Figure 9 Operation Mapping
4. After completing the above settings, click "Run" → "VR Preview" (as shown in Figure 10), and wear the HTC VIVE VR device for VR experience.

insert image description here

Figure 10 Running the VR project

Guess you like

Origin blog.csdn.net/zhw111222/article/details/125764772