ScratchData LogoScratchData
Back to Paddle2See's profile

Trigonometry Cannon

PAPaddle2See•Created January 8, 2008
Trigonometry Cannon
244
218
23155 views
View on Scratch

Description

There always seems to be interest in things that shoot. Here's how to do it with the new Trig functions. Use Space to shoot, Up/Down to control the barrel angle, Right/Left to roll the cannon around. The X key can be used to clear the cannonball paths. This is a cannon with the projectile motion calculated using the new Trig functioons. The tip of the Barrel is also located using the Trig functions so that the Ball can be placed at the Barrel tip when it is fired. Wind is accounted for as a constant change to horizontal velocity. This is not a very realistic model, but it looks good enough for animation. In addition to changing the barrel angle and the wind, the trajectory can be further modified by changing the inital velocity or the acceleration due to gravity (Ay) in the scripts.

Project Details

Project ID77800
CreatedJanuary 8, 2008
Last ModifiedAugust 9, 2023
SharedJanuary 8, 2008
Visibilityvisible
CommentsAllowed