1. Create Turret and Ball sprites
Center Ball sprite in middle of ball, but position pivot point at base of Turret sprite, and draw left to right:
2. Turret script
3. Ball script
If you wish to complete the clone activity below, then save time by declaring your variables locally to the instance of the sprite:
If not, then variables affected globally will affect all instances of the sprite when implementing this script, which means if a projectile is in flight when another is created, both (i.e. all) will be affected:
1. Variable effects
Explain what happens if you increase or decrease the initial variables:
2. Clone projectiles
Try it without wind:
Why does this fail if the variables are made / declared global (i.e. For all sprites) instead of local (i.e. For this sprite only)?
Turn this into a game by adding some of these elements:
limited range of rotation
Can you think of other elements to improve gameplay?