Forum Discussion
bdeschryver
12 years agoExplorer
Reset Rift yaw when game starts
Hey Unity users, I am building a demo of a (virtual) scene to experience while being sit on a chair with the Rift. When my Unity software starts, the screen is all black so that no image is displa...
phileday
12 years agoMember
I'm not sure how classes are dealt with in Java. I'm relatively new to unity so I'm still learning.
Ultamitly what I'm hopeing to achive is when the user hits a key the orientation is reset. It doesn't have to be part of another script or attached to a curtain object or in Javascript just as long as the player can hit say "R" at any point of the game and the orientation is reset.
An example of a complete script with wrong code is provided below.
------------------------------------------------------------------------------------------------------------
#pragma strict
function Start () {
}
function Update () {
if ((Input.GetButtonDown ("Fire1"))){
GameObject.Find("OVRCameraController").OVRDevice.ResetOrientation(0); (Wrong code)
}
}
----------------------------------------------------------------------------------------------------------
As I mentioned it doesn't even have to be in Java.
Hopefully that might make it easier to give me advice on how to apply this. If i come up with an answer with my research I'll also post it here so if you having trouble yourself keep checking back.
Cheers.
Ultamitly what I'm hopeing to achive is when the user hits a key the orientation is reset. It doesn't have to be part of another script or attached to a curtain object or in Javascript just as long as the player can hit say "R" at any point of the game and the orientation is reset.
An example of a complete script with wrong code is provided below.
------------------------------------------------------------------------------------------------------------
#pragma strict
function Start () {
}
function Update () {
if ((Input.GetButtonDown ("Fire1"))){
GameObject.Find("OVRCameraController").OVRDevice.ResetOrientation(0); (Wrong code)
}
}
----------------------------------------------------------------------------------------------------------
As I mentioned it doesn't even have to be in Java.
Hopefully that might make it easier to give me advice on how to apply this. If i come up with an answer with my research I'll also post it here so if you having trouble yourself keep checking back.
Cheers.
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
- 5 years ago
- 3 years ago
- 2 years ago
- 19 days ago
- 5 years ago