Angles and Vectors
Nature of Code Lesson #3.3
In this video, I tackle a common question, how do you draw an object pointing in the direction it’s moving? I demonstrate how to calculate the angle associated with the direction vector as well as create an vector from an angle in p5.js.
Community Contributions
- Asteroid Game by LemurDaniel (Source Code)
- Vector Thrust by LemurDaniel (Source Code)
- Psychad-Angles by Allen Smith (Source Code)
You can also add your own version! (See how)
Links discussed in this lesson
Videos discussed in this lesson
- 1.4 Static Functions - The Nature of Code by The Coding Train
- Asteroids with p5.js - Coding Challenge #46 by The Coding Train