5.2 Seeking a Target - The Nature of Code @TheCodingTrain
5.2 Seeking a Target - The Nature of Code  @TheCodingTrain
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
5.2 Seeking a Target - The Nature of CodeCoding Challenge 183: Paper Marbling Algorithm4.4: Particle Systems with Image Textures - The Nature of CodeCoding Trade Live:  Side Project Saturday! (Live from the Attic)Image Classification with ml5.jsSide Project Saturday!16.1: let vs var - Topics of JavaScript/ES6I would like to say hello to youWhats next?Coding Challenge 171: Wave Function CollapseCoding Challenge 178: Climate Spiral5.7 Path Following (Steering) - Nature of Code
The Coding Train |

5.2 Seeking a Target - The Nature of Code

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER