Here is my monster/rocket which I have made. It still needs more editing to it but here's the start.
Code:
float monsterX = 250;
float monsterY = 250;
void setup(){
size(500,500);
background(255);
}
void draw(){
background(255);
translate(monsterX,monsterY);
rotate(atan2(monsterY-mouseY, monsterX-mouseX) + PI);
MYmonster();
monsterX = monsterX + ((mouseX-monsterX)/50.0);
monsterY = monsterY + ((mouseY-monsterY)/50.0);
}
void MYmonster(){
fill(255,255,255);
noStroke();
stroke(30);
rect(5,5,5,5);
rect(5,35,5,5);
rect(10,10,10,10);
rect(10,25,10,10);
rect(20,15,15,15);
rect(35,15,15,15);
rect(50,15,15,15);
triangle(70,15 ,70,30 ,100,22.5);
ellipse(70,15,10,10);
ellipse(70,30,10,10);
}
So here I have learn't a lot of new skills and functions and still a little confused with them but once I start to play around with them ill understand them a lot better. So here I have created my monster that follows the mouse, and also points at the mouse in a certain direction where ever I move the mouse! This really excites me because this is exactly what I need in my project.
Now my next step is to create an ellipse that reacts as a wave. I'm going to study and find out how to create this wavy motion and maybe my inspiration could help me with this.
No comments:
Post a Comment