Game Development Reference
In-Depth Information
Figure 6-27. Control the camera
Hit the Preview button to play with the projectile.
You can open the file CanonShowPartI-step2.gameproj located in the folder
Chapter6_Files.
Flying and Falling Down: Gravity Concepts
You now have a projectile that is thrown but it only goes up and very rapidly out
of the scene. You need to implement a way to get down to earth so you can try
to reach the targets you will later create. Also, when an object flies in the air, the
air causes some friction that slows down the speed, so you need to define this.
Once Upon a Time, There Was an Apple
Gravity is a natural phenomenon by which physical bodies attract a force
proportional to their mass. The concept of gravity is attributed to Sir Isaac
Newton in the 17 th century. It is denoted by g and is the acceleration that Earth
imparts to objects on or near its surface. It's why you stick to the ground. As
you can see in Figure 6-28, it is measured in meters per second per second of
about 9.8m/s 2 .
Figure 6-28. Illustration of gravity
 
Search WWH ::




Custom Search