The VRCamera object provides some utility functions to facilitate setting the view in VR.
It sets the coordinates to the eye system, so it is easier to draw elements that are static with respect to the head movement.
It returns the coordinats to the default world system, removing any transformartions that might have been applied in eye space.
Sets the camera position to the point (x, y, z).
Sets the Z distance to the near plane.
Sets the Z distance to the far plane.
import processing.vr.*;
VRCamera cam;
void setup() {
fullScreen(VR);
cameraUp();
}
void draw() {
background(200, 0, 150);
cam.setPosition(0, 0, 400);
//...
cam.sticky();
translate(0, 0, 200);
circle(0, 0, 50);
cam.noSticky();
}