Hi BEnm, Be welcome on processing board..
IF you could post your code here, or a link to your sketch online, it would help to understand your problem.
Let guest something: You might get unSmooth effect (steps) because the value you send in your rotation is not a fraction (a float). You need to make sure that the value is a float type.
rotateX(INT) would give steps
rotateX(FLOAT) would be smooth
if you make something like this (INT)/(INT) = (INT)
and (INT)/(FLOAT) = (FLOAT)
Try this here:
Code:
PFont font;
void setup(){
size(400,200,P3D); //Your window should use 3D (OpenGL could be used as well)
font = loadFont("ArialNarrow-Bold-48.vlw"); //Load your font
textFont(font, 48); //Setup the font
}
void draw(){
background(100);
//Create values for rotations
float myRatioX = mouseX/(float)width; //Note that we must be shure that the value should be a float (fraction)
float myRatioY = mouseY/(float)height; //Idem
float myRatioF;
if(mousePressed) myRatioF = frameCount/10; //If the mouse is Pressed, it will be a Int
else myRatioF = frameCount/10f; //Otherwise, it will be a ratio (Float)
//Make the transformations
pushMatrix();
translate(width/2f, height/(float)2, 0); //Two equivalent ways to get a float
rotateX(myRatioF);
rotateY(myRatioX*2*PI);
rotateZ(myRatioY*2*PI);
text("iLoveP5", 15, 50);
popMatrix();
}