Rotate a PShape

void setup()
{
  size(600,600,P3D);
  smooth();
  background(0);
  cam = new QueasyCam(this);
  cam.position.x = 3;
  cam.position.y = -20;
  cam.position.z = 0;
  obj = loadShape("mysterious_object.obj");
}
void draw()
{
pushMatrix();
rotate(radians(millis()*.1));
shape(obj,250,240,200,200);
popMatrix();
}

the shape is upsite down and i want to rotate it int like 180 degres

You can try the PGS library :

import micycle.pgs.*;
void draw(){
obj = PGS_Transformation.rotate(obj, new PVector(250, 240), 0.01);
  shape(obj, 200, 200);
}

Hello,

Example:

PShape obj;

void setup()
{
  size(500, 500, P3D);
  smooth();
  background(0);
  obj = loadShape("rocket.obj");
  obj.rotateZ(TAU/2);
  obj.translate(0, 100, 0);
  obj.scale(.8, .8, .8);
}
void draw()
  {
  background(0);
  translate(width/2, height/2);
  //pushMatrix();
  
  // This: 
  //rotateY(frameCount*TAU/360);
  // Or this:
  obj.rotateY(TAU/360);
  
  shape(obj);
  //popMatrix();
  }

You can find the rocket here:

image

And here:
https://github.com/processing/processing-docs/tree/master/content/examples/Basics/Shape/LoadDisplayOBJ/data

:)

thank you so much !

thank you soo much !