Reputation: 53
I want to get the player height you have set in the oculus settings. For example if you are 185cm(6 feet), apparently the gameobject holding the camera objects has to be set to the same height, which is 185cm.
Is there a function or variable i can look up to get the player height, or do i have to calibrate for myself?
Upvotes: 4
Views: 6039
Reputation: 825
in the OVRCameraRig
prefab, you'll find the component OVRManager
, just set the Tracking Origin Type (under "Tracking") to Floor Level, that way the eyes will go to the player's head automatically.
If you wanna know the height of the player, you can do that by theCenterEyeCameraTransform.localPosition.y
, anyway, this will only work if you have configured the OVRCameraRig
's origin type tracking to Floor Level.
Upvotes: 6