Draw 2D on top in VR mode


There is the eye function for the VR mode:


here an example from the reference:

import processing.vr.*;

void setup() {

void draw() {
   // draw scene...

   translate(0, 0, 100);
   ellipse(0, 0, 50, 50);

As you can see after the eye() call it is followed with a translate in the z direction.
For me to get the 0,0 coordinate in the left top corner I have to do something like:

translate(-width/2, -height/2, 1350);

But the 1350 is just guessing and will probably fail on larger or smaller screens or screen with a different aspect ratio.

Is there a proper way to go into ‘2D’?


You can use hint(DISABLE_DEPTH_TEST) to write on the screen and ENABLE_DEPTH_TEST to change back again.


It ain’t about that. It’s about the position of the camera and the shape of the frustum.
And that the motion doesn’t effect where it is displayed.

A bit like how you can normally use camera() to get to the default position.