About Store Forum Documentation Contact



Post Reply 
Oculus Rift orientation reset.
Author Message
Dalmat Offline
Member

Post: #1
Oculus Rift orientation reset.
We need an reset option for the rift orientation at any given moment.
We only have the readout but no input to the orientation function.
We cant make the rift and mouse controls to work together corretc without reseting the rift orientation to 0 or some crazy calculation. (which we dont belive that pays off)

If it is possible.

Thank you.
01-03-2014 03:08 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Oculus Rift orientation reset.
Hi,

Well the pitch and roll angles are always correct. (based on the sensors).
The only thing I assume you want to adjust is the "yaw" angle.
So why not do that manually?

Vec angles=OculusOrientation().angles();
angles.x += custom_offset; // I don't remember if x or y or z is the yaw
01-03-2014 10:41 PM
Find all posts by this user Quote this message in a reply
miro@3dea Offline
Member

Post: #3
RE: Oculus Rift orientation reset.
As oculus angles are always absolute (earth magnetic field), reset really makes no sense. The solution for our problem is to use oculus angle deltas instead of applying the angles directly. It's easy to calculate delta, so solution looks like this:
Code:
Vec3F oculusAngles = EE::PredictedOrientation().angles();
Vec3F oculusDelta = oculusAngles - EE::Orientation().angles();

player.angle.x -= oculusDelta.y + mouseDelta.x;
player.angle.y -= oculusDelta.x - mouseDelta.y;
player.angleZ = -oculusAngles.z;
you can apply calculation to Cam the same way..
(This post was last modified: 01-10-2014 04:04 PM by miro@3dea.)
01-08-2014 12:38 PM
Find all posts by this user Quote this message in a reply
Post Reply