XR SetTrackingOrigin...?

I’m looking at upgrading my older (SteamVR) project to UE 5.3.1 (OpenXR). It’s a C++ project, and I used to set the tracking origin in my Pawn’s BeginPlay method:

if(UHeadMountedDisplayFunctionLibrary::IsHeadMountedDisplayEnabled())
   UHeadMountedDisplayFunctionLibrary::SetTrackingOrigin(EHMDTrackingOrigin::Stage);

But in 5.3.1, HeadMountedDisplayFunctionLibrary.h is no longer present in Engine\Source\Runtime\HeadMountedDisplay\Public. Yet when I make a new VR template project, the default pawn it creates has this in its BeginPlay:

…? Where is the Head Mounted Display Function Library then? I searched for SetTrackingOrigin and got one hit in IXRTrackingSystem.h, but it doesn’t look like what I want. What gives?

We did a refactor to reduce the overhead of XR support for non-XR projects. You can find the library here:

Engine/Plugins/Runtime/XRBase/Source/XRBase/Public/HeadMountedDisplayFunctionLibrary.h

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.