Forum Discussion
gabriead
11 years agoHonored Guest
How to reset camera perspective of rift using unity?
Hi there,
I want to reset the camera perspective with a certain key. I am currently using the following code but several problems occured:
It does not recognise OVRDevice nor ResetOrientation, so I guess it has been renamed in the updated extension (the update that was released for using the rift with the free version of unity).
What library do I have to include to be able to use OVRDevice?Within the current OVR folder I could not find a function or class that fitted ResetOrientation. All I could find was OVRManager.capiHmd.RecenterPose().
Can you help me on either using the function above or explain to me what function I have to use instead?
Thanks a lot!
I want to reset the camera perspective with a certain key. I am currently using the following code but several problems occured:
public class ResettingView : MonoBehaviour {
private OVRDevice ovrdevice ;
void Update()
{
if (Input.GetKeyDown ("Keycode.V))
{
OVRDevice.ResetOrientation (0);
}
}
}
It does not recognise OVRDevice nor ResetOrientation, so I guess it has been renamed in the updated extension (the update that was released for using the rift with the free version of unity).
What library do I have to include to be able to use OVRDevice?Within the current OVR folder I could not find a function or class that fitted ResetOrientation. All I could find was OVRManager.capiHmd.RecenterPose().
Can you help me on either using the function above or explain to me what function I have to use instead?
Thanks a lot!
2 Replies
Replies have been turned off for this discussion
- cyberealityGrand ChampionThe code to reset/recenter the orientation is like this:
if (Input.GetKeyDown (KeyCode.Alpha7))
OVRManager.display.RecenterPose(); - gabrieadHonored GuestThanks that does the job!
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
- 8 months ago
- 2 years ago