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();