Created Tracking With XR UE4 4.27

I have used OpenXR plugin and used the GetMotionControllerData() to setup the Teleport.

Written the following code. I have not set SetTrackingSource() because by default it will take OpenXR if enabled.

        FXRMotionControllerData ControllerData;
        IXRTrackingSystem* TrackingSys = GEngine->XRSystem.Get();
	TrackingSys->GetMotionControllerData(GetWorld(), EControllerHand::Right, ControllerData);
	FVector Start = ControllerData.AimPosition;
	FVector End = Start + ControllerData.AimRotation.GetForwardVector() * TPRange;
1 Like

Thanks for sharing. I’ve been meaning to look at this.

Might I ask which headset you have? I currently have a WMR headset and it’s not the easiest to work with so am considering a Quest 2 myself.

I have quest 2. But i think open xr will work with any headset at it is the new standard in VR

1 Like

hi there i wah wondering what are the pros and cons of using OpenXT ?
i am aiming to make my game compatible with the most hmd and i was wondering is that’s a requisite to support the quest 2 and ow does it compare to OpenVRExpansionPlugin ? can i use both ? thanks in advance.

Ok with my understanding open XR is a industry standard for vr now. So every headset out there should support openXR. This is the reason am using open xr and one more reason is that open xr have some function which directly feed controler data irrespective of umotioncontroler component.

1 Like

might take a look but i fear having too much to re-code for it to work with what i already have i’ll see thanks anyway!

Privacy & Terms