tubeshowcase●1,670,700 videos♡ My collection 0
← Learn to Code

Learn to Code13:08

5.2 Seeking a Target - The Nature of Code

The Coding Train ↗

From the creator

This video explores Craig Reynolds’ formula for Steering Behaviors in JavaScript (p5.js) beginning with “Seeking a Target.” Code: https://thecodingtrain.com/tracks/the-nature-of-code-2/noc/5-autonomous-agents/2-seeking-a-target p5.js Web Editor Sketches: 🕹️ Seek: https://editor.p5js.org/codingtrain/sketches/AxuChwlgb 🕹️ Seek With Sliders (Exercise): https://editor.p5js.org/codingtrain/sketches/DROTtSI7J 🕹️ Arrive (Exercise): https://editor.p5js.org/codingtrain/sketches/dQx9oOfTN 🕹️ Pursue (Exercise): https://editor.p5js.org/codingtrain/sketches/XbsgoU_of 🎥 Previous video: https://youtu.be/P_xJMH8VvAE?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM 🎥 Next video: https://youtu.be/Q4MU7pkDYmQ?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM 🎥 All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM References: 🔗 Steering Behaviors for Autonomous Characters: http://www.red3d.com/cwr/steer/ Videos: 🎥 Gravitational Attraction: https://youtu.be/EpgB3cNhKPM 🎥 Angles and Vectors: https://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 🚂 Websi

Published 2021-06-16 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code