Im trying to make a arc rotate at a fixed point in the center around my mouse. pls help?

edited December 2016 in How To...

My code is pretty bad so it would be pointless to post it. Thx for your help.



  • Hello

    Try this

    float value = 0;
    void setup()
     size(1000, 600);
    void draw() {
    void keyPressed() {
      if(value >=6.28){
        arc(mouseX, mouseY, 80, 80, 0, value,PIE);
  • Can you be more specific? To draw an arc, you need a bunch of parameters-

    • Firstly, what do you want as the centre of the arc? It seems like you want is the the mouse position.
    • Secondly, what angle should is sweep? You haven't specified it.
    • Lastly, what should its size be? Is seems like you want a circular arc with radius same as distance b/w centre of screen and mouse position.
Sign In or Register to comment.