Uploaded June 2021 | Updated September 2026, 1 week ago
This video explores Craig Reynoldsβ formula for Steering Behaviors in JavaScript (p5.js) beginning with βSeeking a Target.β Code: thecodingtrain.com/tracks/the-nature-of-code-2/noc/5-autonomous-agents/2-seeking-a-target
p5.js Web Editor Sketches:
πΉοΈ Seek: editor.p5js.org/codingtrain/sketches/AxuChwlgb
πΉοΈ Seek With Sliders (Exercise): editor.p5js.org/codingtrain/sketches/DROTtSI7J
πΉοΈ Arrive (Exercise): editor.p5js.org/codingtrain/sketches/dQx9oOfTN
πΉοΈ Pursue (Exercise): editor.p5js.org/codingtrain/sketches/XbsgoU_of
π₯ Previous video: youtu.be/P_xJMH8VvAE?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ Next video: youtu.be/Q4MU7pkDYmQ?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ All videos: youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
References:
π Steering Behaviors for Autonomous Characters: red3d.com/cwr/steer
Videos:
π₯ Gravitational Attraction: youtu.be/EpgB3cNhKPM
π₯ Angles and Vectors: youtu.be/oXwCVDXS2Lg
Timestamps:
0:00 Hello!
1:10 What is the desired velocity for seeking?
2:46 What is the steering force?
5:23 Let's make a Vehicle class from Particle.
6:25 Now we need a target.
6:48 Now let's add code to the seek method!
8:21 What can we do to make this feel a bit more realistic?
9:16 Adding a maximum force.
10:27 Let's do a little clean up.
11:05 What could you try next?
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
π Website: thecodingtrain.com
πΎ Share Your Creation! thecodingtrain.com/guides/passenger-showcase-guide
π© Suggest Topics: github.com/CodingTrain/Suggestion-Box
π‘ GitHub: github.com/CodingTrain
π¬ Discord: thecodingtrain.com/discord
βͺ Nebula: go.nebula.tv/codingtrain
π Membership: youtube.com/thecodingtrain/join
π Store: standard.tv/codingtrain
ποΈ Twitter: twitter.com/thecodingtrain
πΈ Instagram: instagram.com/the.coding.train
π₯ Coding Challenges: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Intro to Programming: youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π p5.js: p5js.org
π p5.js Web Editor: editor.p5js.org
π Processing: processing.org
π Code of Conduct: github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecodingtrain.com/issues/new
#forbeginners #javascript #p5js
This video explores Craig Reynoldsβ formula for Steering Behaviors in JavaScript (p5.js) beginning with βSeeking a Target.β Code: thecodingtrain.com/tracks/the-nature-of-code-2/noc/5-autonomous-agents/2-seeking-a-target
p5.js Web Editor Sketches:
πΉοΈ Seek: editor.p5js.org/codingtrain/sketches/AxuChwlgb
πΉοΈ Seek With Sliders (Exercise): editor.p5js.org/codingtrain/sketches/DROTtSI7J
πΉοΈ Arrive (Exercise): editor.p5js.org/codingtrain/sketches/dQx9oOfTN
πΉοΈ Pursue (Exercise): editor.p5js.org/codingtrain/sketches/XbsgoU_of
π₯ Previous video: youtu.be/P_xJMH8VvAE?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ Next video: youtu.be/Q4MU7pkDYmQ?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
π₯ All videos: youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM
References:
π Steering Behaviors for Autonomous Characters: red3d.com/cwr/steer
Videos:
π₯ Gravitational Attraction: youtu.be/EpgB3cNhKPM
π₯ Angles and Vectors: youtu.be/oXwCVDXS2Lg
Timestamps:
0:00 Hello!
1:10 What is the desired velocity for seeking?
2:46 What is the steering force?
5:23 Let's make a Vehicle class from Particle.
6:25 Now we need a target.
6:48 Now let's add code to the seek method!
8:21 What can we do to make this feel a bit more realistic?
9:16 Adding a maximum force.
10:27 Let's do a little clean up.
11:05 What could you try next?
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
π Website: thecodingtrain.com
πΎ Share Your Creation! thecodingtrain.com/guides/passenger-showcase-guide
π© Suggest Topics: github.com/CodingTrain/Suggestion-Box
π‘ GitHub: github.com/CodingTrain
π¬ Discord: thecodingtrain.com/discord
βͺ Nebula: go.nebula.tv/codingtrain
π Membership: youtube.com/thecodingtrain/join
π Store: standard.tv/codingtrain
ποΈ Twitter: twitter.com/thecodingtrain
πΈ Instagram: instagram.com/the.coding.train
π₯ Coding Challenges: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Intro to Programming: youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π p5.js: p5js.org
π p5.js Web Editor: editor.p5js.org
π Processing: processing.org
π Code of Conduct: github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecodingtrain.com/issues/new
#forbeginners #javascript #p5js










