Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
ColinB's avatar
ColinB
Adventurer
12 years ago

Adjusting eye height within build?

Sorry if I've posted twice. This seems to be the correct forum...

Very new to this stuff.
Went through the "getting started" exercise. Opened Unity, created new project. Loaded in the Tuscany thing,
Yay..All worked out OK. Great demo and everything..But I cannot get the eye height buttons 4 and 5 to do anything when viewing the build. I can move about etc but no height or eye adjustment when viewing.

Yes, the actual "Oculus World Demo" itself in the OculusSDK folder allows adjustment with = and - but the outcome build from the exercise does not.


Looking about at some of the demo's I've loaded down that some allow the eye height to be adjusted with 4 and 5.
Some do not.
What must I do to allow manipulation of the eye or the body height from within my build?
Thanks

9 Replies

Replies have been turned off for this discussion
  • Hmmm. No replies?

    Probably a difficult question.
    Well can anyone suggest another forum or group to ask?
  • I tried to test it out last night, but something wasn't working.

    If I get a chance today, I will get you an answer on this.

    Also moving to the Unity section, as you may be more eyes on this.
  • Add this code into OVRPlayerController in UpdateMovement():

    Vector3 headVec = new Vector3();

    if (Input.GetKey(KeyCode.R)){
    CameraController.GetNeckPosition(ref headVec);
    headVec.y += 0.1f;
    CameraController.SetNeckPosition(headVec);
    }

    if (Input.GetKey(KeyCode.F)){
    CameraController.GetNeckPosition(ref headVec);
    headVec.y -= 0.1f;
    CameraController.SetNeckPosition(headVec);
    }


    Then in the editor for OVRCameraController, uncheck "Use Player Eye Height".

    That should work well for testing.
  • "cybereality" wrote:
    Add this code into OVRPlayerController in UpdateMovement():

    Vector3 headVec = new Vector3();

    if (Input.GetKey(KeyCode.R)){
    CameraController.GetNeckPosition(ref headVec);
    headVec.y += 0.1f;
    CameraController.SetNeckPosition(headVec);
    }

    if (Input.GetKey(KeyCode.F)){
    CameraController.GetNeckPosition(ref headVec);
    headVec.y -= 0.1f;
    CameraController.SetNeckPosition(headVec);
    }


    Then in the editor for OVRCameraController, uncheck "Use Player Eye Height".

    That should work well for testing.


    Newbie here. :oops:
    Tried that, but unfortunately didn't work for me :?

    I edited the file with the integrated Mono-Develop-Editor in Unity and saved it.

    I pasted the code right after line 218 and 219:

    public virtual void UpdateMovement()
    {


    Then reloaded Unity with my Project and rebuilt. But it still doesn't listen to the keys. :?:

    Any suggestions?
  • Gerald's avatar
    Gerald
    Expert Protege
    "cybereality" wrote:

    CameraController.GetNeckPosition(ref headVec);


    does this mean eye height influences the neck model? so far I just move up and down the cam controller to affect eye height.
  • EnDnS's avatar
    EnDnS
    Honored Guest
    Had the same problem as well. There was no option for removing use player height in the inspector.
    Here's what I did instead. I went into OVRPlayerController and under if (useProfileHeight), I commented the method already there and added this:
    if (Input.GetKey("f"))
    {
    CameraController.transform.localPosition = CameraController.transform.localPosition + new Vector3(0,.01f,0);
    }
    if (Input.GetKey("v"))
    {
    CameraController.transform.localPosition = CameraController.transform.localPosition + new Vector3(0,-.01f,0);
    }

    Its buggy but its a quick work around. Im still trying to figure out how to do it like i saw in that one demo The RPG room.