Hi friends,
I’m trying to translate a shape with the PGS library.
But this code give me no results, the shape does’nt move.
It’s the same problem with all function from PGS_Transformation
class.
Where I’m wrong ?
import micycle.pgs.*;
PShape sh;
void setup(){
size(256, 256);
sh = createShape();
sh.beginShape();
sh.vertex(20, 160);
sh.vertex(200, 200);
sh.vertex(100, 100);
sh.endShape(CLOSE);
}
void draw(){
background(128);
shape(sh);
}
void mousePressed(){
PGS_Transformation.translateTo(sh, mouseX, mouseY);
}