Using the HMD/Camera position doesn’t quite cut it because it’s affected by the head’s rotation. I would like to get a height that’s not affected by it. Or as little as possible, so that I get the same result whether the player is looking up or down.

I thought the neck position from the Get Pose function in the Oculus library would work but it obviously doesn’t return what I thought it would.

A while back, I was doing research into this. My hypothesis was that there is a common pivot point somewhere in the users neck and it is somewhere along the spine. The pivot point doesn’t move, regardless of head orientation. So, how do we find this pivot point?

I created a back vector from the HMD position and drew a persistent debug line. Then, I moved only my head around and looked at where those lines converged. The convergence point would be the non moving bone position. From there, we could measure the height difference between the bone height and top of the head, and then we can figure out the height of the player, regardless of the HMD rotation.

So, far what I did is build a float curve where the pitch of the HMD is the time and the values represent the distance to subtract/add to the returned Z. I inserted custom points every 10 degrees because the neck is a strange beast. I was expecting a somewhat linear curve but it’s far from it.

It works well enough for me but I fear this curve will be unique to each user. I’ll probably need to build a calibration routine.

Keep in mind that head is moving permanently, so it’s impossible to find converging point unless you ask player to perform head calibration. Then, the algorithm to find this point (if spine is stable, player doesn’t move) is quite simple problem of spatial geometry.