We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
I am new to processing.
I have drawn the stickman, but i need help to make his arms and legs move when i move the mouse in different directions. The body and head should stay at the same place.
This is my code:
void setup() {
size (300,300);
}
void draw() {
ellipseMode (CENTER);
rectMode (CENTER);
//Head
ellipse (150,60,50,50);
point (140,60);
point (160,60);
//Body
rect (150,135,50,100);
//Arms
line (125,85,100,160);
line (175,85,200,160);
//Legs
line (130,185,130,250);
line (130,250,125,250);
line (170,185,170,250);
line (170,250,175,250);
}
Answers
You should at least use variables in place of hard numbers. So you can change its length & position!
Sensational rotating arms & legs! <:-P
Published to see it online too: http://studio.processingtogether.com/sp/pad/export/ro.9ozYNbweyOpjT/latest
Hi! I am having the same problem. I've been doing a couple tutorials, but it seems like i am doing something wrong here.
I want my stickman to move his arms and legs when i move my mouse, could you guys help me out with it? I've tried to use the code thats been published in the thread, but i can't get it to work right.
I got some datafiles for my stickman, background and music, so i wont post that. But it would be great if you guys could show me how to make the arms and legs move. i'll post the code below. Thanks.
Thank you TfGuy44!
Just what i needed :)
"if you guys could show me how to make the arms and legs move"
Since your code looks a lot like the one in the first message, you were already shown how to do it.
"I've tried to use the code thats been published in the thread, but i can't get it to work right."
Wow, that's precise problem report!
What didn't "work right"?
never mind! I figured it out. Thanks anyways.
I used this for left and right arm.