Cleaned up the vehicle a bit, added the classic pursue and evade functions, illustrated here.
pursue
- give it a target and it willseek
a number of paces aheadevade
- give it a target and it willflee
a number of paces ahead
Video Info
- coding train link: https://thecodingtrain.com/tracks/the-nature-of-code-2/noc/5-autonomous-agents/3-pursue-and-evade
- video in playlist: https://www.youtube.com/watch?v=Q4MU7pkDYmQ&list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM&index=40
- code: https://editor.p5js.org/codingtrain/sketches/v-VoQtETO
Instructions
Nothing to do here, this is between them.
- "l" to start or stop the the running sketch