Forum Discussion
drash
12 years agoHeroic Explorer
Player Height breakdown
If I grab the player's stored eye height via OVRDevice.GetPlayerEyeHeight(), it rightly shows a value a little over 0.1m below my actual full height that I entered in the config tool. SDK-wise, how do I then use this or other values to set a custom height at runtime? I no longer see a way to specify an Eye Position/Offset in the OVRCameraController inspector, no doubt because Oculus would like to use the true head position from the tracking camera instead of using a neck model. However, in OVRCameraController.ConfigureCamera(), I see that it is doing this:
All that seems to be doing is propagating the ICD, and nothing about the neck to the eye/camera height. I figured that the Vector3 should actually be something like (eyePositionOffset, Hmd.OVR_DEFAULT_NECK_TO_EYE_VERTICAL, Hmd.OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL), like EyePosition's initial value in OVRCamera. So I decided to modify the "cam.EyePosition = " line above to include a non-zero Y value, and it seems that my height in game didn't change. (This is with usePlayerEyeHeight off.)
The Unity Integration guide (for 0.4.2) still seems to mention an Eye Center Position property as well, so if this is changing, I'd love to know where it's headed. ;)
Furthermore, when looking at the OVR.Hmd.DEFAULT_* constants, I don't see anything that indicates a reasonable default for the vertical distance from "eye to top of head", so I'm curious how one would reconstruct the full player height from the other heights etc.
I'm sure I'm barking up the wrong tree / missed a turn, etc. Anyone have some experience with the breakdown and how the height can accurately be manipulated within the SDK's framework?
cam.NeckPosition = NeckPosition;
cam.EyePosition = new Vector3(eyePositionOffset, 0f, 0f);
All that seems to be doing is propagating the ICD, and nothing about the neck to the eye/camera height. I figured that the Vector3 should actually be something like (eyePositionOffset, Hmd.OVR_DEFAULT_NECK_TO_EYE_VERTICAL, Hmd.OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL), like EyePosition's initial value in OVRCamera. So I decided to modify the "cam.EyePosition = " line above to include a non-zero Y value, and it seems that my height in game didn't change. (This is with usePlayerEyeHeight off.)
The Unity Integration guide (for 0.4.2) still seems to mention an Eye Center Position property as well, so if this is changing, I'd love to know where it's headed. ;)
Furthermore, when looking at the OVR.Hmd.DEFAULT_* constants, I don't see anything that indicates a reasonable default for the vertical distance from "eye to top of head", so I'm curious how one would reconstruct the full player height from the other heights etc.
I'm sure I'm barking up the wrong tree / missed a turn, etc. Anyone have some experience with the breakdown and how the height can accurately be manipulated within the SDK's framework?
1 Reply
Replies have been turned off for this discussion
- ViktorLinderHonored GuestI think this is "Camera Root Position" of the OVRCameraController which tells how the OVRCameraController is offset from the ground plane. So if your OVRCameraController is placed below a OVRPlayerController / other FPS-style-capsule-construct in the hierarchy with an identity transform, and the capsule is 2m high, "Camera Root Position" would be (0, 1, 0).
/Viktor
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago
- 8 months ago
- 6 months ago