Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

Project 4: Juggling

foudiab
foudiab 


4. Juggling Create a world with a character (you choose the character) and three juggling balls. Write a method to animate the character juggle the balls in the air. Use a loop to make the juggling act repeat five times and then the juggling balls should fall to the ground. Of course, the character must have at least two arms and be able to move them in some way that resembles a tossing motion. Hint: A juggling ball is easily created by adding a sphere or a tennis ball to the world, resizing it, and giving it a bright color. Hints: Start with two balls in one hand, and one in the other. There should be a world.juggle method The character needs to juggle at least 3 balls, use parameters to call any two balls for each toss. The toss only needs to be up and over, not a full "real" juggle - see video example. The character should juggle for at least 5 cycles The balls need to fall to the ground at the end of the juggling loop Include textual storyboard and code comments Some hints for this assignment: You only need to make the balls go up and over to the other hand, not a true juggle where they go in a full circle although you're welcome to try it if you enjoy the challenge. As you think through your storyboard you should see that there is an action that is repeated over and over: two balls changing hands at a time. This is a prime example of a time to use parameters so you can swap any two balls of the three into the piece of code you write. One solution is to create two additional world methods: juggle and throw throw contains the code to just make two balls exchange hands in an upward and over arc (two parameters) juggle contains three calls to throw (a full juggling cycle of all three balls) (1) to swap balls 1 & 2 (2) to swap balls 3 & 1 (3) to swap balls 2 & 3 Your first method can contain a loop of juggle and instructions to drop the balls when juggling is done. ... you might need to add a couple of hidden objects to get the balls to move where you want them. This is what it should look like: http://www.youtube.com/watch?v=WRQYXt8spwU Attachments
Tags Clarifications

Answers