NOC Week 4 - Oscillation
This week, I made a simple target shooting game based on the canon ball sketch provided in the homework example.
(left and right arrows to aim, space to shoot)
I used this assignment as an opportunity to combine contents from different practice examples, including using velocity.heading to show the direction of an object and using cos and sin to graph a path for the target.
I used dist() to measure the distance between the position of the target and the bullet to measure if the target is hit or not.
I had to reference a lot from the example codes provided because I am still trying to fully understand working with angles and trigonometry in p5 but the assignment had been a good exercise in helping me to better understand how to work with the concepts we learned this week.