Forum Discussion
hanshadow
10 years agoHonored Guest
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
- cyberealityGrand ChampionYou can change the height inside the Oculus config util.
Valid values range from 132 cm to 229 cm. - petereptProtegeHow do we override that in code?
- cyberealityGrand ChampionSo 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;
} - rkatosHonored GuestI 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. - jmorris142ExplorerThank you!, I've been trying to change height all day in different ways until I looked here. phew. this works very well
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
- 2 years ago
- 10 months ago
- 10 months ago
- 7 months ago
- 11 months ago