The node Get Orientation and Position returns a rotation and position in roomscale, but for me the Z axis value seem to differ a bit from each time i do a room calibration. Last few days it’s been about 10 when it’s flat on the ground, and after i did a recalibration, it now says about 14. Its not like it’s a lot of difference, but still enough to throw off my calibration logic. So is there a more reliable way of getting the Z axis/ground floor value other than asking the user to put the headset on the ground and press a button or something?
The floor should be calibrated when the player runs through their room setup. It’s a part of the calibration process, so if you look at the chaperone bounds, they should align with the floor in your room. When you are working within UE4 and doing roomscale VR, the room “origin” is at the center of the play space on the floor, so that Z value is zero. When you query the HMD Z value, it is the displacement from the floor. If you have a floor calibration step in your game, it’s sort of redundant and counter productive. Sometimes, the virtual floor can be off by a few centimeters. When that happens, either restart UE4 or recalibrate SteamVR. If the bottom of the chaperone bounds match your real world floor, it’s not SteamVR. I think there’s a node within UE4 which can return all of the points in the chaperone boundary, so maybe if you look at the Z value of any of those points, you can get the margin for error on the Z value and compensate accordingly? Totally shooting in the dark here, but its a direction to investigate.
I actually found out today, that the headset sensor position will return a value of domewhere between 10-14 cm in my case if the headset is on the floor. So in other words, it does not return close to zero. However since i needed this mostly to measure player height, i added an artificial offset of 8cm which corresponds ok ok the difference of the headbone of my gamecharacter and where the hmd sits(eye level). This allows me to get a pretty decent height measurement.
The chaperone object always seem to retun 0 on the z axis. So im guessing the floor calibration we do during roomsetup is not saved there. Might have to peek in the engine if there’s info on where that value is stored.