Use your mouse-pointer to change the direction in which the cannon will fire. Press the space bar to fire the cannonball. Very simple. Enjoy! :D
This is a basic cannon simulation using concepts that I recently learned in my physics class. The code is quite simple, especially if you understand the physics. I will be thinking of a way to incorporate these physics into a game. In the meantime, I hope you enjoy. -Smashbros6