VR Question - Motion Controller Location

Hello!

This is my first time asking a question on this forum.

I’m developing a VR project, and I’m concerned with always tracking the Motion Controller’s position relative to the headset. I currently have the following function:

(I subtract 30 centimeters to lower the reference point of the HMD)

This works very well, but it isn’t quite what I’m looking for. If I physically rotate in space in VR, the [X,Y,Z] coordinates output by this function rotate with me. What I actually want is the ‘absolute, relative’ location of the motion controller. Here is an image to demonstrate the idea:

If I rotate in space with my right arm outstretched, the controller remains in the same relative position to my head. Yet, with my function, the values of its relative location change (like on the top). What I want is how it is on the bottom, where its location values stay the same, independent of my movement in space. How to I get the values I’m looking for?

Thank you!

Hi Bog,

Welcome to the forums! Cool question.

I think you’re getting these results because all of that is happening in world space, where you’d really want to be operating in local space.

I haven’t groked how to do this, but maybe using the ‘Inverse Transform Location’ node is the path forward.

This community tutorial comes to mind when I think about converting between coordinate spaces.

Hope that helps!

1 Like