Hi, I’m using the google translator …
I need the tip of my triangle to point to the coordinates of my mouse, here I leave what I could find out and do about it
void setup(){
size(500, 500);
}
void draw(){
PVector v1 = new PVector(width/2, height/2);
PVector v2 = new PVector(mouseX, mouseY);
float r = PVector.angleBetween(v1, v2);
background(255);
pushMatrix();
translate(width/2, height/2);
rotate(-degrees(r));
triangle(0,0,50,100,-50,100);
popMatrix();
}