# OpenXR VR Template | Feedback and Discussion

**URL:** <https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425>\
**Category:** XR Development\
**Tags:** unreal-engine\
**Created:** [August 19, 2021, 9:32pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425 "2021-08-19T21:32:07Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Mardud](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mardud](https://forums.unrealengine.com/u/Mardud)\
**Post date:** [October 10, 2021, 9:32am UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/21 "2021-10-10T09:32:57Z")

</div>

When I change AxisDeadzoneThreshold value to something else and than bring it back to 0,7 as it was, teleport is not working, why ?

---

<div class="post-metadata">

**Author:** ![roberteker](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@roberteker](https://forums.unrealengine.com/u/roberteker)\
**Post date:** [October 18, 2021, 1:46pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/22 "2021-10-18T13:46:35Z")

</div>

Are there any nodes to discern if a Reverb or G2 is currently being used?

---

<div class="post-metadata">

**Author:** ![VictorLerp](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/victorlerp/32/738381_2.png) [@VictorLerp](https://forums.unrealengine.com/u/VictorLerp)\
**Post date:** [October 20, 2021, 2:35pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/23 "2021-10-20T14:35:03Z")

</div>

“Get HMDDevice Name”

---

<div class="post-metadata">

**Author:** ![roberteker](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@roberteker](https://forums.unrealengine.com/u/roberteker)\
**Post date:** [October 21, 2021, 7:15am UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/24 "2021-10-21T07:15:35Z")

</div>

Thank you.

This, unfortunately, lead me here which isn’t too great:

> [@Get HMDDevice Name: Needs clarification.](https://forums.unrealengine.com/t/get-hmddevice-name-needs-clarification/78711):
>
> In the documentation for Get HMDDevice Name, it is missing what types of HMD devices we can call. This should follow the same structure that Get Platform Name has (I put in bold the part that is needed): The documentation should follow the same structure as Get Platform Name: [Get Platform Name | Unreal Engine Documentation](https://docs.unrealengine.com/latest/INT/BlueprintAPI/Game/GetPlatformName/index.html)

I don’t have both headsets here to test, so I can’t confirm what they’re named… also, am I supposed to do string matching on this or how is it meant to work? (Guess I need to look in the template to see how they solved it.)

---

<div class="post-metadata">

**Author:** ![Rectus\_SA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rectus\_SA](https://forums.unrealengine.com/u/Rectus_SA)\
**Post date:** [October 21, 2021, 12:20pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/25 "2021-10-21T12:20:56Z")

</div>

I’d imagine that mainly exists for debug purposes. When using OpenXR it retrieves the system name from the XRSystemProperties struct, which has no standardized representation in the spec, so the result may vary between implementations.

OpenXR seems to be designed to hide all this information from the developer, specifically so that it can’t be used for configuration purposes. I’m guessing you want to get the device name to set up controller input. The intended way seems to be to just set up action bindings for each controller type and let the runtime handle everything else.

The difference between configuring different types of controllers seems to be a huge limitation in OpenXR at the moment. For example configuring inputs for controllers that might have a touchpad, thumbstick or both. There doesn’t seem to be any guide or best practices on how this is supposed to be implemented in either Unreal, or OpenXR in general.

It seems the only way to properly handle disparate controls is to create separate actions for each type of control and only bind them to the controllers that support them. It would be a good idea on Epics side to add documentation and examples on the proper way to handle this.

---

<div class="post-metadata">

**Author:** ![roberteker](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@roberteker](https://forums.unrealengine.com/u/roberteker)\
**Post date:** [October 21, 2021, 1:36pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/26 "2021-10-21T13:36:17Z")

</div>

> [@Rectus\_SA](#):
>
> I’m guessing you want to get the device name to set up controller input.

Yes, and also to show the correct controller. We run both HP Reverb Pro and HP Reverb G2 in our studio and they use different controllers.

As we may show customers models in VR who have never used VR before, we don’t want to have to teach them every time, so it’s much easier to have the correct controller in VR with a highlight showing them where to push.

Unfortunately, even professional CAD software use custom controller graphics that just confuse people and make them not find the buttons they’re asked to press because what they see in VR doesn’t correspond to what they’re holding in their hands.

---

<div class="post-metadata">

**Author:** ![Rectus\_SA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rectus\_SA](https://forums.unrealengine.com/u/Rectus_SA)\
**Post date:** [October 21, 2021, 2:14pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/27 "2021-10-21T14:14:28Z")

</div>

For that kind of controlled use case, it might be enough to find out what the runtime outputs from “Get HMDDevice Name” for the different headsets and do the string comparison.

This only holds true as long as you can control what runtime and hardware the user has though. As an example it’s relatively popular to run the G2 through SteamVR together with Valve Index controllers, and sync the tracking spaces with a third party app.

Another option seems to be the “Get Motion Controller Data” node. The name field returns the interaction profile path for the controller, so if the runtime reports a different path for the G2 controller (probably needs the G2 extension set up), it might be used to differentiate them. The paths are defined in the OpenXR spec, so they should be consistent across runtimes.

---

<div class="post-metadata">

**Author:** ![VictorLerp](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/victorlerp/32/738381_2.png) [@VictorLerp](https://forums.unrealengine.com/u/VictorLerp)\
**Post date:** [October 21, 2021, 7:46pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/28 "2021-10-21T19:46:41Z")

</div>

> [@roberteker](#):
>
> also, am I supposed to do string matching on this or how is it meant to work? (Guess I need to look in the template to see how they solved it.)

Yes, string matching is how you’d use the function. The runtimes return names of devices, we don’t have control over that.

> [@Rectus\_SA](#):
>
> For that kind of controlled use case, it might be enough to find out what the runtime outputs from “Get HMDDevice Name” for the different headsets and do the string comparison.

Yes and if you enable the HP Reverb controller plugin you’ll have access to input bindings for their controllers, and device visualization will work for HP Reverb G2. We don’t have controller models in /OpenXR Content/Devices for the Reverb Pro, however.

> [@Rectus\_SA](#):
>
> It seems the only way to properly handle disparate controls is to create separate actions for each type of control and only bind them to the controllers that support them.

Yes for some input types separate Action events is the only way to “catch all” right now. We’re aware of this and want to make it better.

> [@Rectus\_SA](#):
>
> Another option seems to be the “Get Motion Controller Data” node. The name field returns the interaction profile path for the controller

This is how we can identify which controllers are used (motioncontroller device visualization is using the interaction profile to determine which controllers to display). But if there’s no interaction profile for your controller, OpenXR will pick the one that’s the closest. This is the way we’re doing it until the OpenXR specification details how to deal with controller models.

---

<div class="post-metadata">

**Author:** ![VictorLerp](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/victorlerp/32/738381_2.png) [@VictorLerp](https://forums.unrealengine.com/u/VictorLerp)\
**Post date:** [October 21, 2021, 7:52pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/29 "2021-10-21T19:52:16Z")

</div>

> [@Kavan](#):
>
> Is there a better way to do this?

That’s how you’d do it!

In the past I made a function library-function that I would call that execute SetWorldToMeters _and_ scale motioncontroller models + game logic where that’s relevant.

We’re not going to make that something that “just works”, as there are more differences than similarities in how developers would want to handle that.

---

<div class="post-metadata">

**Author:** ![VictorLerp](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/victorlerp/32/738381_2.png) [@VictorLerp](https://forums.unrealengine.com/u/VictorLerp)\
**Post date:** [October 21, 2021, 7:55pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/30 "2021-10-21T19:55:19Z")

</div>

> [@RolyatDerTeufel](#):
>
> Which has me curious if i should add those buttons to your BP Interface. From the looks of it, with the primary/secondary its for communicating grabbed actor functions, ie. the gun firing?

Yes you’d use VRInteractionBPI If you want to pass input from buttons to held actors, and you’d set up action input events for those in VRPawn just like the existing ones for Trigger.

---

<div class="post-metadata">

**Author:** ![Kavan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kavan/32/1194623_2.png) [@Kavan](https://forums.unrealengine.com/u/Kavan)\
**Post date:** [October 21, 2021, 8:07pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/31 "2021-10-21T20:07:54Z")

</div>

> [@VictorLerp](#):
>
> That’s how you’d do it!

on the topic, there seems to be a bug where this world scaling freaks out if multiple editor tabs are open. There are tons of online post describing it going back pretty far and it still is happening on the latest launcher build. Is this something that you’re aware of and that might get addressed at some point?

---

<div class="post-metadata">

**Author:** ![roberteker](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@roberteker](https://forums.unrealengine.com/u/roberteker)\
**Post date:** [October 22, 2021, 8:58am UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/32 "2021-10-22T08:58:13Z")

</div>

> [@VictorLerp](#):
>
> Yes, string matching is how you’d use the function. The runtimes return names of devices, we don’t have control over that.

I might have missed if you commented on [the link](https://forums.unrealengine.com/t/get-hmddevice-name-needs-clarification/78711) I quoted earlier, but both the HP Reverb and HP Reverb G2 return “Windows Mixed Reality”.

> [@Rectus\_SA](#):
>
> Another option seems to be the “Get Motion Controller Data” node. The name field returns the interaction profile path for the controller

Hmm… mine just reports “None”… but then again, I now can’t seem to make any input mappings work for some reason (just updated to 4.27.1).

---

<div class="post-metadata">

**Author:** ![Rectus\_SA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rectus\_SA](https://forums.unrealengine.com/u/Rectus_SA)\
**Post date:** [October 22, 2021, 9:01am UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/33 "2021-10-22T09:01:42Z")

</div>

> [@roberteker](#):
>
> Hmm… mine just reports “None”… but then again, I now can’t seem to make any input mappings work for some reason (just updated to 4.27.1).

Oh right, I forgot to mention that. I was testing it yesterday, and for some reason the motion controller data wouldn’t populate properly until after a few frames after pressing play.

---

<div class="post-metadata">

**Author:** ![jimgris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jimgris](https://forums.unrealengine.com/u/jimgris)\
**Post date:** [October 23, 2021, 5:26am UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/34 "2021-10-23T05:26:29Z")

</div>

Hi i was experimenting smooth vr locomotion based in various Vr youtube tutorials in unreal 4.26 and earlier versions from the engine, now with open xr in 4.27 using the template with Oculus quest 2 via link, had a problem that for some reason the hmd once in vr had a delay in the movement so the headset displays a gravity movement like a drunk vr experience, the problem goes and comes depending on activating oculus vr or oculus xr plugin. Works for 1 or two tests and then again stars to wobble again, for clarification these events occurs in various cases like when importing VR controllers from 4.26 versions. When opening a vr locomotion in a separate project using the template from 4.26. i dont really understand much about open xr but i think that some vr classes like controllers interfere with hidden operations, someone has the same problem here?. Thanks!!

---

<div class="post-metadata">

**Author:** ![VictorLerp](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/victorlerp/32/738381_2.png) [@VictorLerp](https://forums.unrealengine.com/u/VictorLerp)\
**Post date:** [October 27, 2021, 1:29pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/35 "2021-10-27T13:29:05Z")

</div>

> [@roberteker](#):
>
> I might have missed if you commented on [the link](https://forums.unrealengine.com/t/get-hmddevice-name-needs-clarification/78711) I quoted earlier, but both the HP Reverb and HP Reverb G2 return “Windows Mixed Reality”

Which runtime are you using? That’s unfortunately out of our control, but a problem nonetheless - I will log it and see what can be done about it.

---

<div class="post-metadata">

**Author:** ![VictorLerp](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/victorlerp/32/738381_2.png) [@VictorLerp](https://forums.unrealengine.com/u/VictorLerp)\
**Post date:** [October 27, 2021, 4:29pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/36 "2021-10-27T16:29:42Z")

</div>

This issue is related to having an active SceneCaptureComponent in the scene (the VR Spectator is the default Blueprint that contains it in the VR Template). It’s known, but I have no ETA on a fix as of now.

---

<div class="post-metadata">

**Author:** ![jimgris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jimgris](https://forums.unrealengine.com/u/jimgris)\
**Post date:** [October 28, 2021, 2:56pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/37 "2021-10-28T14:56:49Z")

</div>

thanks for your answer @VictorLerp , the more you know…, now i understand is not only my case, unfortunately i can´t track where i used a scene capture component or where it hides if not in the vr spectator to forcea clean up and make the hmd work normally again, if anyone can point mme to the right direction i will be grateful, oh thanks again excellent work by the way.

---

<div class="post-metadata">

**Author:** ![roberteker](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@roberteker](https://forums.unrealengine.com/u/roberteker)\
**Post date:** [October 29, 2021, 12:52pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/38 "2021-10-29T12:52:06Z")

</div>

> [@Rectus\_SA](#):
>
> Oh right, I forgot to mention that. I was testing it yesterday, and for some reason the motion controller data wouldn’t populate properly until after a few frames after pressing play.

Hmm… I still get “None” from the node setup below, however I don’t know what to plug into the world context node…

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/d/8d75b5a70e046ad69dfaed53639325ac17a926a0.png)

> [@VictorLerp](#):
>
> Which runtime are you using? That’s unfortunately out of our control, but a problem nonetheless - I will log it and see what can be done about it.

Well, being an industrial designer, I unfortunately don’t understand what a “runtime” is in this context. I use Unreal Engine 4.27 with the OpenXR and HP Controller plugins enabled (and Datasmith, although that shouldn’t have anything to do with VR).

---

<div class="post-metadata">

**Author:** ![Rectus\_SA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rectus\_SA](https://forums.unrealengine.com/u/Rectus_SA)\
**Post date:** [October 29, 2021, 1:21pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/39 "2021-10-29T13:21:40Z")

</div>

> [@roberteker](#):
>
> Hmm… I still get “None” from the node setup below, however I don’t know what to plug into the world context node…

Testing it again, the same setup you have works for me, but I noticed it can’t read the data if the application isn’t focused. For me the SteamVR overlay was automatically opened on launch, and it wouldn’t get the data until I closed it.

---

<div class="post-metadata">

**Author:** ![Rectus\_SA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rectus\_SA](https://forums.unrealengine.com/u/Rectus_SA)\
**Post date:** [October 29, 2021, 2:23pm UTC](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425/40 "2021-10-29T14:23:28Z")

</div>

It seems this behavior is caused by the `xrGetCurrentInteractionProfile()` function, called by  
`FOpenXRHMD::GetMotionControllerData()`.

Testing this with a custom C++ application interfacing directly with OpenXR, I’m getting consistent results. For the first two frames before the session transitions into `XR_SESSION_STATE_VISIBLE`,  
`xrGetCurrentInteractionProfile()` will return a `XR_NULL_PATH` instead of the set interaction profile path. If the SteamVR dashboard is open at application start, it will return `XR_NULL_PATH` until one frame after the session transitions into `XR_SESSION_STATE_FOCUSED`. If the dashboard is opened while the application is running, it is still able to get the correct path.

The OpenXR spec is unclear on if this is the correct behavior or not.

I’m testing this with the OpenXR runtime in SteamVR beta 1.20.4, using Windows 10. It would be interesting to know if other runtimes behave the same way.

[Previous page](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425.md?page=1)

[Next page](https://forums.unrealengine.com/t/openxr-vr-template-feedback-and-discussion/246425.md?page=3)
