Hey guys,
I’m trying to rotate an object to mouse direction using the atan2 but when i start to use ofRotate() that rotate the object from the canvas origem …
How can i do to rotate using the center of the object ?
Thanks !
ofTranslate(location.x, location.y);
ofRotate(angle);
ofSetColor( 255,220,220 , 100);
ofEllipse(0, 0, r, r * 0.7);
ofSetColor( 255,220,220);
ofEllipse(0, 0, r, r * 0.6);
ofPopMatrix();