Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
hanshadow's avatar
hanshadow
Honored Guest
10 years ago

sdk .5 - Where is OVRCameraController? Player height?

In the latest download OVRCameraController with 'Use player eye height' is gone. I can lift my player off the ground somewhat by setting Height to 0 (?) in OVRPlayercontroller, but he is still very short. how can I make him taller?

5 Replies

Replies have been turned off for this discussion
  • You can change the height inside the Oculus config util.

    Valid values range from 132 cm to 229 cm.
  • So in the OVRPlayerController inspector, uncheck "Use Profile Data".

    Then in OVRPlayerController.cs, add the following at the bottom of Update() (around line 202):

    Vector3 heightAdjustment = new Vector3 (0.0f, 0.01f, 0.0f);

    if(Input.GetKey(KeyCode.I)){
    CameraRig.transform.localPosition += heightAdjustment;
    }
    if(Input.GetKey(KeyCode.K)){
    CameraRig.transform.localPosition -= heightAdjustment;
    }
  • rkatos's avatar
    rkatos
    Honored Guest
    I got an error on CameraRig.transform, I changed it to

    if(Input.GetKey(KeyCode.I)){
    CameraController.transform.localPosition += heightAdjustment;
    }
    if(Input.GetKey(KeyCode.K)){
    CameraController.transform.localPosition -= heightAdjustment;

    and that worked. I also lowered the "Y" increment to .005.

    Thanks for the help.
  • Thank you!, I've been trying to change height all day in different ways until I looked here. phew. this works very well