Moving and Changing Velocity
- If the physics is move to exactly where you want, it's easy (just
do it).
- If it's move discretely (e.g. one step forward, turn ....),
it's also fairly easy (though see path
following).
- It becomes more complex if you're using steering and velocity (like
spacewars).
- It becomes even more complex if you want to deal with friction in
car simulations.
- For now, let's just talk about space wars. The physics is a lot easier.
- If the agent is still and wants to go to a place, just point to that
place and then go.
- That is, move the direction vector of the agent to point to the
desired locale (L).
- If the agent is at A, the desired direction vector is A-L (in 2 or
3D).
- The magnitude doesn't matter, because you're just going to go,
and then eventually go over L.
- What direction do I want to move in if I'm at 3,4 and want to go to
7,2?
- What direction do I want to move in if I'm at 3,4,1 and want to go to
7,2,9?
- What if you want to stop at L?