Forum Discussion
ColinB
12 years agoAdventurer
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
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
- ColinBAdventurerHmmm. No replies?
Probably a difficult question.
Well can anyone suggest another forum or group to ask? - cyberealityGrand ChampionI 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. - cyberealityGrand ChampionAdd 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. - sotasystemsHonored Guest
"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? - ColinBAdventurer
- sotasystemsHonored Guest
"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: - GeraldExpert 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. - EnDnSHonored GuestHad 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. - cyberealityGrand ChampionSee 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.
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
- 13 years ago
- 21 days ago