Jump to content

Vive Tracker in Unreal


Recommended Posts

Hi all,


I was trying to create a mixed reality setup in Unreal Engine 4 using the HTC Vive Tracker to track the real world camera. But I stumpled upon a problem, which I wasn't able to solve by myself. 

While using the "Get Tracked Device Location and Orientation" node within Unreal I've realized that the output of the coordinate system is Y-up (Pitch, Yaw, Roll) instead of Z-up (Roll, Pitch, Yaw - used by Unreal)

Which led to the problem that when I was setting my virtual cameras orientation to the orientation of the tracker, that (depening on method I tried) always one or two axis were wrong/inverted. I've also tried both methods (just in case) for setting the world and relative orientation of the virtual camera to the trackers orientation.


Can you provide me with a method with which I'm able to convert the coordinate system in Blueprint or am I doing something completly wrong anyways? Or is it enough to reset the tracker after mounting it on the camera? (I wasn't able to test this myself because I found out how to do that today) 

Link to comment
Share on other sites

  • 2 years later...

I found a solution on the Unreal Forums. In your Tracker Blueprint, place a CombineRotators node in between your Get Tracked Device Position and Orientation node (or GetWorldRotation node)  and the SetRelativeLocationAndRotation (or SetRelativeRotation. Plug the return value from the Get node into the B input of the CombineRotators. set the A values as: X = 0, Y = 90, z = 0. Here's the link to the forum thread...



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...