IHeadMountedDisplay needs GetBaseOffset

It has GetBaseOrientation but no GetBaseOffset. Edit: I’m using C++

GetBaseOffset is needed to position real-world objects relative to HMDs with positional tracking. In my case, I have a physical object (PSMove controller) that I’ve coregistered to the Oculus DK2 camera space and I need to further transform that into the game world. I believe I need access to the HMD yaw and offset to do so.

I’ve [asked a separate question][2] about how to include the OculusRift plugin in my module as a work around.


Moved to Bug Reports.

Hello bullale,

I have a quick question for you before we dig into specifics. Have you tried using the “Get Base Rotation and Base Offset in Meters” node?

Hi Rudy.
I’m sorry I didn’t state this explicitly (it was only a tag), but I’m using C++.
GEngine->HMDDevice->GetBaseOrientation() works wonderfully.
GEngine->HMDDevice->GetBaseOffset or GEngine->HMDDevice->GetBaseOffsetInMeters do not exist.

Here’s a patch.link text

Hello bullale,

After doing some digging I have a suggestion that I would like for you to try.

Could you try using the following to create an OculusHMD variable?

FOculusRiftHMD* OculusHMD = GetOculusHMD();

With the OculusHMD variable created you should then be able to pull get the information that you need from that variable.


Could you let me know if this works for you?

I’ll try, but…

  1. How do I make FOculusRiftHMD available to me? (See my other [question][1] that I linked to in the OP).

  2. I’m doing this within a (game) plugin. My understanding isthat I should not be dependent on another (Engine) plugin. Wouldn’t it be preferable for me to use the IHeadMountedDisplay interface?


In case it wasn’t clear, the patch I included above works as expected. Using that patch, I was able to complete my plugin.

I think it is intuitive that, if IHeadMountedDisplay has a function called GetBaseOrientation then it should also have a function like GetBaseOffset for HMDs with positional tracking, and it will return FVector(0) for HMDs without positional tracking.

If, for some reason, you hate taking patches then I can make a pull request. Just let me know.

Hello bullale,

I have written up a feature request ( UE-18532) for the GetBaseOffset and I have submitted it to the developers for further consideration. I am happy to hear that you have your plug in up and running. As for submitting a pull request, you may feel free to place that request here:


Make it a great day

I finally got around to making a pull request.

Hello bullale,

I am happy to hear that you have gotten around to submitting a pull request. Could you provide an update if/when the developers get back to you on the results of your pull request?

Make it a great day