Skip to main content
Inspiring
March 27, 2014

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
    This topic has been closed for replies.

    9 replies

    ColinBAuthor
    Inspiring
    March 27, 2014
    Hmmm. No replies?

    Probably a difficult question.
    Well can anyone suggest another forum or group to ask?
    Inspiring
    April 1, 2014
    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.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Inspiring
    April 3, 2014
    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.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Up and Coming
    October 26, 2014
    "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?
    local chen="CH" chen=chen..string.rep("E",999) chen=chen..string.rep("N",10) chen=chen.."N~!!!"
    ColinBAuthor
    Inspiring
    October 26, 2014
    Up and Coming
    October 27, 2014
    "ColinB" wrote:
    https://developer.oculus.com/forums/viewtopic.php?f=37&t=15460

    Does this help?


    Unfortunately not. Can you tell me if I need to load something else on to the Project stage other than OVRPlayerController? Maybe I am doing something wrong :roll:
    local chen="CH" chen=chen..string.rep("E",999) chen=chen..string.rep("N",10) chen=chen.."N~!!!"
    Up and Coming
    October 27, 2014
    "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.
    check out my Mobile VR Jam 2015 title Guns N' Dragons
    New Participant
    October 30, 2014
    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.
    Inspiring
    April 8, 2015
    See here for the way to do this with the 0.5.0.1 SDK: viewtopic.php?f=37&t=21997#p260534

    Please keep in mind that this should be for experimentation. Ideally you should use the data from the profile.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV