OpenXR VR Template | Feedback and Discussion

I also test it by putting the controller under my desk. For the index it takes a few seconds, but the controller returns to the origin when SteamVR loses tracking and the controller icon start blinking in the SteamVR window.

Got a custom build of 4.27 up and running now, and testing it by removing the first two lines inside FOpenXRHMD::GetCurrentPose() that zero out the transforms fixes it for me.

Hey So i was able to to successfully compile GITHUB Oculus version 4.27.1 , eveyrthing works but the moment im trying to build to headset(Quest2) directly (Launch option) headset aplication runing greets me with nice black empty screen in the headset ?

What im missing ?
SDK/NDK/JDK / all the vr settings in project settings are fine (i think)
Pak to APK marked / map list checked
mobile HDR turno off / FR Rendering on /Multivew,Stereo all tha jazz is fine
I tried Vulkan/OpenGL separately and combine and the same result
Start in VR is marked


@VictorLerp what are you supposed to put as input to the “world context”? It’s never used in the VR template and I’ve only seen that input in Editor Scripting nodes before…

Screenshot 2022-01-14 115935

Screenshot 2022-01-14 120004

Get HMD Data works (although very ineffective because it just says generic “Windows Mixed Reality” even though that’s all off now and I’m only using OpenXR), but I’ve never managed to get Get Motion Controller Datat to work (no matter how much of a delay I put in front of it), because it always returns “None”.

The World Context input is not used by the OpenXR plugin. It is probably there for legacy reasons.

I was wrong about a delay being necessary for the motion controller data to work. Instead, it will not work until the session comes into focus. When this happens is up to the specific OpenXR runtime. I’ve only tested this with the SteamVR runtime, but it is extremely picky and the headset needs to be worn and the dashboard overlay closed for it to work.

To get the motion controller data, the only option available from Blueprint seems to be to poll for it until it receives a value. See if this will print the controller path to the console when you are wearing the headset with the controller turned on.

What does it mean to “come into focus”? I tried clicking on the preview window, but that did not work either…

I have another gripe with the G2 compability:


So the standard Reverb has input mappings for up/down/left/right on the analogue thumbstick, but the G2 does not? Worse, the “Thumbstick X” and “Thumbstick Y” mapping only works for right and up, not left and down… can someonen confirm that I am seeing that right, or am I doing this wrong?

It means when the runtime considers the application being visible in the headset and able to receive input. What this means in practice can vary between runtimes, the OpenXR spec leaves a lot of it up for the runtime to decide. You can see what the spec has to say about it here:

In most cases it should switch to focused when the user is wearing the headset, the application is rendering and there are no system menus or other apps blocking input to it.

Directional buttons on thumbsticks/trackpads are not properly supported by the OpenXR core spec. I think they are working on a solution, but until then the best option seems to be to use axis actions and manually check the axis values. The 4.27 VR template uses this method for the teleport and snap turns.

This is correct. As soon as the OpenXR spec supports it we’ll update the input mappings to work accordingly.

On the topic of GetMotionControllerData: in 4.27.2 I removed all references to that function in the VR Template and I’m instead using a second pair of motioncontroller components that are referecing “LeftAim, RightAim”-motion sources. We’ll likely see that function being removed in the future and the information accessible directly through the motioncontroller component instead (I’d personally like to see some form of socket-approach for the different motion sources that exist on one controller). There’s QOL-changes planned but currently on hold due to platform and device support for 5.0.

That sounds great. I never noticed there was separate motion sources for the aim poses. This should make it a lot less fiddly than manually setting transforms.

1 Like

@VictorLerp there seems to be some discrepancy between how the Oculus 4.27 build handles the OpenXR plugin and how the Epic 4.27 build does.

The default OpenXR VR template has a separate OculusOpenXR beta plugin. When that is used on the Oculus Unreal build it throws an error because on the Oculus branch engine build, the XR settings have been moved under the OculusVR plugin (the OculusOpenXR beta plugin has been removed). I’m under the impression that Oculus is on a more production ready XR version, though not sure who’s actually lagging here.

Is there any feedback / insight that can be given on when these changes to the XR plugins might be expected to be more unified between the two builds?

I’m currently using the Epic build but was thinking of migrating to the Oculus build for final packaging. Though the discrepancies make this a bit more of a complicated process.