We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello there,
I'm really not much experienced with processing, I have an object that must be moving in a specific angle. My object is already in the center (I'm glad I made it that far) and I want it to rotate 30 degrees up and down, I already could manage to make it move 30 degrees down but I have not the slightest clue how to make it a fluently move that continues moving up and down. I already tried a lot of things but just can't figure out how to do it. Btw this is the code that I could create yet:
int myRotation;
void setup() { size(600, 600); background(150); fill(255); noStroke(); }
void draw() {
background(255); fill(0);
if(myRotation < 30) { myRotation++; }
for (int i = 2; i<3; i++) { for (int e = 3; e < 4; e++) { pushMatrix(); translate(300, 300); rotate(radians(myRotation)); quad(0, 0, -50, -100, 50, 0, -150, 50); popMatrix(); } } }
thanks a lot in advance! :)
Answers
What do you mean when you say you want to make it move 30 degrees down? Do you have any mock images? Also please properly format your code using the code button in the forum editor.
my object is aiming to the right and its supposed to rotate to 30 degrees upwards, then stops, starts to rotate 60 degrees downwards, and over and over again. sry for that shitty explanation.
thanks a lot
Example below.
Kf
Thank you very much sir, problem solved