please show your code
in general use pushMatrix(); and popMatrix(); to isolate the skateboard rotation from the rest (axes in the X,Y,Z directions):
pseudo-code:
pushMatrix();
translate(x,y,z);
rotate(a);
shape(skate, 0,0);
popMatrix();
a+=0.0412;
// draw axes in the X,Y,Z directions
Example with full mouse rotation
void setup() {
size(1640, 860, P3D);
}
void draw() {
avoidClipping();
background(152);
lights();
pushMatrix();
translate (width/2, height/2, 400);
rotateX(map(mouseY, 0, height, -TWO_PI, TWO_PI));
rotateY(map(mouseX, 0, width, -TWO_PI, TWO_PI));
textMode(SHAPE);
textAlign(CENTER, CENTER);
fill(255);
text("Hello", 0, 0);
translate(60, 0);
box(18);
translate(-120, 0);
box(18);
popMatrix();
drawFloor();
}
// ---------------------------------------------------------------------------
// Tools
void avoidClipping() {
// avoid clipping (at camera):
// https : //
// forum.processing.org/two/discussion/4128/quick-q-how-close-is-too-close-why-when-do-3d-objects-disappear
perspective(PI/3.0, (float) width/height, 1, 1000000);
}//func
void drawFloor() {
pushMatrix();
//stroke(111); // gray
noStroke();
fill(0, 2, 255); // blue
float factor1=80.0; // dist between boxes
translate(width/2, height/2, 0);
for (int x=-55; x<55; x++) {
for (int z=-55; z<55; z++) {
pushMatrix();
translate(x*factor1 - (4*factor1/2),
height-111,
z*factor1 - (4*factor1/2) );
fill(map(z, -55, 55, 100, 255), 0, 0);
box(40); // size of 40 (width, height and depth)
popMatrix();
}
}
popMatrix();
}
//