cancel
Showing results for 
Search instead for 
Did you mean: 

Help changing the current view

thebarryman
Honored Guest
Hello everyone,

I would like to change the direction my character is currently looking, basically going from looking straight forward to looking straight down. Usually I would just do this just by changing the character's rotation, but this doesn't affect the OVRCameraController, so I'm using the SetOrientationOffset() function instead.

I easily figured out how to change where the Oculus' "center" is looking -- ie. the position that the Oculus is looking at when you bring it back to the same physical state it was in when the game begins. But my issue comes when I'm trying to change the direction the player is looking at right now.

So If I have my chair rotated 90 degrees to the left of where I started playing, when I change the orientation offset of the OVRCameraController to look straight down instead of straight forward, I'm actually looking straight to the left. Only when I turn my chair back to the center will I be looking straight down.

I think this will require some quaternion math, and unfortunately I am a bit out of my depth when it comes to these matters...any help would be much appreciated!!

PS: I am using the Unity integration package
2 REPLIES 2

Anonymous
Not applicable
If you want the cameras to rotate when the player rotates, THIS thread might be a step in the right direction. I was just dealing with the same issue, and I adjusted a couple things in the OVRCamera.cs script to remedy it.

tlopes
Honored Guest
It sounds to me like you may be having one of the following problems:
You're using a different basis than the OVR library (they use a Y-up coordinate system with the X axis going left-to-right and the Z axis going forwards and backwards).
Or
You're using the same axis but a different handedness than the OVR library (I believe that all of the OVR stuff is left-handed).

In these cases, you should consult Unity and see what they use. Afterwards, you can Google around for some simple basis-change equations or handedness changes 🙂