Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
christina.angel
christina.angel's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Help me pls I want walking of my robot.
[4 Replies]
30-Dec-2012 08:11 PM
Forum:
Programming Questions
void setup(){
size(500,500,OPENGL);
}
void draw(){
background(127);
drawhuman();
}
void drawhuman()
{
pushMatrix();
translate(width/2, (height/2)-100);
box(40);
translate(0,80);
scale(0.8,1);
box(80);
translate(70,0);
scale(1,2);
box(30);
translate(-140,0);
box(30);
translate(50,40);
scale(1,1.5);
box(20,15,30);
translate(0,18);
box(20,15,30);
translate(40,-18);
scale(1,1.5);
box(20,10,30);
translate(0,12);
box(20,10,30);
popMatrix();
}
void keyPressed() {
if (key == CODED) {
switch (keyCode) {
case DOWN:
; break;
case UP:
; break;
case LEFT:
; break;
case RIGHT:
translate(width/2,height/2);
rotateY(radians(90));
translate(0,0);
drawhuman();
; break;
}
}
}
This is my code I want When the user presses the right arrow, the
body will start walking to the right, and vice versa. When the key is released, the body
will stop walking and stay straight.Help me pls.Thankss
«Prev
Next »
Moderate user : christina.angel
Forum