5.2 Seeking a Target - The Nature of Code

preview_player
Показать описание


References:

Videos:

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

#forbeginners #javascript #p5js
Рекомендации по теме
Комментарии
Автор

It has been 3 years since I started following you it was because of you that I chose computer science in the first place, you made it so easy for me. I came back to say hi, I can't count how many things I learned during these 3 years, but if I were to count I will count the videos you made that opened my mind to this field, Thank you so much for everything.

eboubaker
Автор

Who else feels like they have gone through time and Dan is still amazing!

vachila
Автор

As someone who wants to study autonomous systems, this is by far my favorite video of yours so far! :)

naut_nigel
Автор

Your lessons are relaxing. I learn for fun.

skrypciarz
Автор

I am very upset that your latest videos do not gain the deserved number of views / likes / comments, either YouTube algorithms are choking you, or something else. But the fact is that 2 years ago almost every the video has gained more than 100.000 views, and now - much less makes me sad. After all, you create even more awesome content that needs to be known ..

monsieuralexandergulbu
Автор

Looking forward to the next video 🙌
I always have trouble with the arrive behaviour when I need it to stop at an exact coordinate

trinosan
Автор

I was messing around and I created like a 1000 of these agents and I noticed the higher the difference between maxspeed and maxforce is the more spread the agents are.
What I mean is if both are the same no matter how high or low they are, all the agent clump up and look like 1 single agent but if the difference is 100 doesn't matter if maxspeed is 20 and maxforce 0.1 or maxspeed is 200 and maxforce 2 as long as there is a beg difference the agent take so long to change direction that they stay mostly separate and look like a huge swarm on the screen

cypher
Автор

I like your energy so much, thank you so much :) !! great videos

DrNabeel
Автор

Hi dan sir. Great video. This has helped me a lot.

ZaidAjani
Автор

The missile knows where it is, because it knows where it isn't

spicybaguette
Автор

During turns, when adding the steering force to the current velocity the agent(s) often seem to lose speed. Which makes sense, since adding a vector that's pointing in a different (entirely or slightly opposite) direction of the current velocity will cause the magnitude of the vector to shrink. Is there any way to prevent this and make the agent preserve its speed, even during the turns?

henkp.
Автор

I would love for you to talk about PID control

mariovelez
Автор

hello sir ... great video ...i have question why agent flip suddenly...why it is not rotating

mukundmagdum
Автор

Great video! Glad you popped up on my feed! Are you basically deriving a PID controller over this series?

lawrencejob
Автор

I have recreated this and have the same behaviour as seen in the video however I have noticed that maxforce is ignored when the target is 180 deg behind so when the arrow passes the target it instantly changes direction and oscillates back. How can I correct this behaviour?

tonysims
Автор

How can i make it so it does not move if the cursor remains stationary it rapidly changes direction without moving which would not look good for like a 2d rpg game.

Mossy
Автор

Hey it would be great to see more videos in the discord bot series !!!

prastabghimire
Автор

Believe it or not Craig theory is still used in creating several target seeking missile for steering missiles

basiccoder
Автор

I have a question, so how would I have a sprite rotate(steer) towards another sprite

WolfieMoonDev
Автор

How calls the simulation, where the agent cannot rotate so hard, but it's limited by max_angle_speed?

darkfrei