Willkommen auf unserem Seminar-Blog

Immer auf dem aktuellen Stand bleiben

Dieser Seminar-Blog befindet sich noch im Aufbau und wird in den kommenden Tagen entsprechend verfeinert.

Member Login

Lost your password?

Registration is closed

Sorry, you are not allowed to register by yourself on this site!

You must either be invited by one of our team member or request an invitation by email at viad.info {at} zhdk {dot} ch.

Oculus Rift Hints

With this code snipped you get the transformation matrix to get your eye direction.

// get the data of head tracking sensor
PVector orientation = new PVector();
// x = yaw , y = pitch , z = roll
oculusRiftDev.sensorOrientation(orientation);

mat = new PMatrix3D();
mat.rotateY(orientation.x);
mat.rotateX(orientation.y);
mat.rotateZ(orientation.z);
mat.translate(0,0,-3);

// sphere
stroke(100,0,0);
pushMatrix();
applyMatrix(mat);
sphere(1);
popMatrix();