"Get Positional Tracking Camera Parameters" broken

I’m trying to use the “Get Positional Tracking Camera Parameters” blueprint function to position a model of the DK2 camera at the same location and with the same orientation in virtual space as it has in the real world. Unfortunately the function doesn’t report the values correctly. “Camera Orientation” always reports pitch and roll values of 0 regardless of how the camera is pointing and a yaw value which, whilst functional, doesn’t seem to be entirely accurate (i.e. it’s only within a couple of degrees or so of the true value. Similarly, “Camera Origin” seems to give incorrect values for z.

Could we please get a fix for this issue?

Many thanks,

Mike

EDIT: I’m using UE4 v4.5.1 and OVR v0.4.3 with the latest firmware (although the issue has existed in at least the last couple of versions of UE4 and may not have ever worked properly).

Hello DickDastardly,

After looking into the issue I found that I was having a similar problem with this node returning the correct values. I have submitted a report (UE-6145) to the developers for further consideration. Thank you for your time and information. I will provide updates with pertinent information as it becomes available.

Make it a great day

Thanks Rudy.

Hi,

Could we get an update on this bug please? I’ve yet to see “UE-6145” appear on any lists of resolved (or even known) issues and it’s been quite a while since the original report.

Many thanks,

Mike

Hello DickDastardly,

This has just recently been updated as fixed internally and will be available in a later release of the engine.

That’s great news, thanks very much for your help Rudy.

Hello DickDastardly,

I have been looking into this issue. The reason that your node is returning as all zeros is because you need to setup your camera manager to use HMD. I have also been informed that the orientation will only update when changes are made to the orientation by the mouse. I hope that this information helps.

Make it a great day

Hello DickDastardly,

I would like to let you know that I saw your comment and I had posted a reply. However, after submitting my reply both my answer and your comment were removed due to what I am assuming was an error with answerhub.

The answer that was given:

I have been looking into the issue. I have found that the node will return all zeros if the camera manager is not set up to follow HMD tracking. I was also informed that this feature will only track changes that are made with the mouse. I hope this information helps.

Camera manager example:

Make it a great day

This is still broken in 4.8 it seems. I just can’t get the position of the positional tracking camera relative to the users head the right way.

Hello ,

Could you elaborate on your issue exactly? When you say that you cannot get the “…tracking camera relative to the users head the right way”, could you go into more detail about what you mean by the “right way”?

Hi Rudy,

I just want to draw a debug circle which renders the camera’s position relative to the user’s head (I want to fade-in a mesh as warning when the user gets to close to the tracking boundaries later).



But instead, the camera is rendered near the world origin. If this are valid world-coordinates, shouldn’t it be visible in front of my pawn?

Maybe I am just doing something wrong, I’m really confused by “get Orientation and Position”, “get camera location”, “get Base Rotation and Base Offset In Meters” in combination with “Get Positional Tracking Camera Parameters”.

This is my current setup (which doesn’t work either):

Hello ,

I was able to reproduce the results that you are seeing. I believe that this issue is separate from the original poster’s issue. I have written up a report ( UE-17546) and I have submitted it to the developers for further consideration. Thank you for your time and information.

Make it a great day

Hmm, good to know, thank you.

I know this sounds harsh, but I am really at the edge of desperation about the long-lasting bad state of UE4’s VR integration (sorry, just saying it). I am working with it for about 8 months now but it just doesn’t get much better (or faster).

Are they any plans to clear all this up a little in the future? It’s really no fun ATM, no matter what you’re trying to achieve - bugs will stop you every time. :frowning:

Hello ,

To answer your question, we are always striving to improve the various sections of the engine. Please keep in mind that some issues may take longer to resolve depending on complexity, priority, and severity.

That very interesting, many thanks. Guess I will just wait another few months until the basic VR stuff works, then. Either this, or Epic changes some of their priorities. :wink:

Here is the blueprint with the sphere:

Here is the variant with the cone, however, I am not sure I interpreted cone’s params completely correct (there is literally no docs about it); but anyway, it shows something pretty close to truth:

This is fantastic, many thanks for that!

My reading of this is that the GetPositionalTrackingCameraParameters function is returning the camera’s position and rotation in the same local coordinate system that the DK2 is using. Then you undo that by transforming through the HMD local coordinate system to the CameraManager==World coordinate system. Is that correct?

Based on the function description [in ][1] and [in the docs][2], this function should be returning the values in world space, so I think this is still broken.

[1]:
[2]: XR Best Practices in Unreal Engine | Unreal Engine 5.1 Documentation

After a quick glance at the code, I guess that the extra work to transform the position and orientation (see here for example) needs to be added here.

Edit: Fixed first link.

Based on the function description in and in the docs, this function should be returning the values in world space

Yes, that was very confusing for me, too (and is still to be honest).