• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 19. Emulating the Natural World:... > Throwing Objects Around the Stage

Throwing Objects Around the Stage

Throwing an object around the Stage is a little more complex than just moving the object with key or button presses. If you throw a baseball, it has a certain speed when it leaves your hand. However, as soon as it leaves your hand, it begins to slow down. Why? Friction. The baseball is in contact with the air around it, and as it moves through the air, the air impedes its forward motion. The baseball is affected also by gravity, but worry just about friction for the moment.

In this section, you create an object that you can “throw” around the stage with your mouse. You’ll click and hold the object, move it to another location on the stage, and then let it go. This causes the object to continue in that direction. After you let go, you’ll let friction take over.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint