Get orientation in VR mode?

Hey everybody!

I’d like to get whatever my orientation is while in VR mode. I don’t mean just landscape or portrait but the exact azimuth, e.g. -PI to PI.

I know how to get my orientation via the compass example, but the sensors are allready being called upon in VR mode, so I don’t think I should call upon them again. I’ve been combing through the library files without luck.

I’ve written code that allows the user to walk through a VR environment, but I need the current orientation so that, for example, the UP key always moves the user forward.

Anybody know? Thanks in advance!

Think I got it.

import processing.vr.*;

PMatrix3D eyeMat = new PMatrix3D();

void setup() {

void draw() {


Maybe these next posts are relevant: