Path Following
Nature of Code Lesson #5.7
Continuing the quest to implement all of Craig Reynolds’ steering behaviors in JavaScript with p5.js, in this video I tackle path following!
Topics
- 0:00 - Follow along, I look at path finding!
- 0:23 - Code! Let's create a Path class.
- 1:18 - Code! Now we need a follow force.
- 1:51 - Explain! What are the steps to path following?
- 5:08 - Code! Step one: predict future position.
- 5:40 - Code! Modify vectorProjection() to findProjection().
- 8:12 - Code! Use findProjection() and the rest of the steps.
- 10:30 - Code! Refining the example.
- 11:49 - Ideas? What could you create?
- 13:28 - Amendment! I forgot to talk about direction!
- 14:43 - No idea what's next but hope to see you there!
Community Contributions
It seems like there haven't been made any variations based on this lesson by the community yet. Be the first and add your own! If you don't know how, take a look at this guide.
Links discussed in this lesson
- Steering Behaviors For Autonomous Characters by Craig Reynolds
Videos discussed in this lesson
- Scalar Projection - Nature of Code 5.6 by The Coding Train