Flipcard (based on Topics/Textures/TextureQuad example) Front and Back

Hello @Gus_Fermin ,

I have also grappled with this before but ended up simplifying my approach.

You can do this for simple rotations about the Y:

void draw() {
  background(0);
  translate(width / 2, height / 2, -5);
  float startAngle = -TAU/4;
  float angle = (frameCount%720)*TAU/720;
  float angle2 = startAngle+angle;
  rotateY(angle2);
  //fill(#0768ED);
  //circle(150, 100, 50);
  if (angle2 > -TAU/4 && angle2 < TAU/4)
    shape(quadIN, 0, 0);
  else
    shape(quadOUT, 0, 0);
  }

I did this for this example:
OpenTrack UDP Data Tracking

More complex rotations may be problematic.

UPDATE:
I see that you sorted this out already!

:)

1 Like