function setup()
a=0
end
function draw()
background(40, 40, 50)
a=a+1
translate(WIDTH/2,HEIGHT/2)
rotate(a)
stroke(255,0,0)
strokeWidth(4)
line(0,0,200,0)
end
Yess, i also did something really similar but i didn't realize that it rotated starting from 0,0, that s why i couldn't do it right. Thank you so much dave!
Comments
@Drea I've read that several times, but I still don't know what you want to do. Can you give more details on what you mean.
I mean like the clock hands, they rotate on a single point
Like this.
It works with that sprite, but for example if i wanted to create a line (350,250,350,500) and then rotate
Ops a part of my message was delated... i was saying and then rotate without changing the initial x and y positions, how should i do?
Yess, i also did something really similar but i didn't realize that it rotated starting from 0,0, that s why i couldn't do it right. Thank you so much dave!
Since you mentioned clock hands above, I thought I'd throw this in.
Nice job man