5.7 Path Following (Steering) - Nature of Code
The Coding Train The Coding Train
1.7M subscribers
107,359 views
2.6K

 Published On Oct 16, 2021

Continuing the quest to implement all of Craig Reynolds’ steering behaviors in JavaScript with p5.js, in this video I tackle path following! Code: https://thecodingtrain.com/tracks/the...

p5.js Web Editor Sketches:
🕹️ Path Following: https://editor.p5js.org/codingtrain/s...
🕹️ Complex Path: https://editor.p5js.org/codingtrain/s...

🎥 Previous video:    • 5.6 Vector Dot Product (Scalar Projec...  
🎥 All videos:    • The Nature of Code  

References:
🔗 Steering Behaviors for Autonomous Characters: http://www.red3d.com/cwr/steer/

Videos:
🎥 Scalar Projection:    • 5.6 Vector Dot Product (Scalar Projec...  

Timestamps:
0:00 Follow along, I look at path finding!
0:23 Let's create a Path class.
1:18 Now we need a follow force.
1:51 What are the steps to path following?
5:08 Step one: predict future position.
5:40 Modify vectorProjection() to findProjection().
8:12 Use findProjection() and the rest of the steps.
10:30 Refining the example.
11:49 What could you create?
13:28 I forgot to talk about direction!
14:43 No idea what's next but hope to see you there!

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

🚂 Website: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/pas...
🚩 Suggest Topics: https://github.com/CodingTrain/Sugges...
💡 GitHub: https://github.com/CodingTrain
💬 Discord: https://thecodingtrain.com/discord
✪ Nebula: https://go.nebula.tv/codingtrain
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
🖋️ Twitter:   / thecodingtrain  
📸 Instagram:   / the.coding.train  

🎥 Coding Challenges:    • Coding Challenges  
🎥 Intro to Programming:    • Start learning here!  

🔗 p5.js: https://p5js.org
🔗 p5.js Web Editor: https://editor.p5js.org/
🔗 Processing: https://processing.org

📄 Code of Conduct: https://github.com/CodingTrain/Code-o...

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecod...

#forbeginners #javascript #p5js

show more

Share/Embed