AI Movement and Acceleration
Humans have feet which effectively attach to the ground(really high static friction) then they change shape(leg joints) to move one foot in front of the other in turn.
This lets them stop nearly instantly, since no sliding is involved, he simply stops changing the shape of his leg position. And they can get moving again nearly instantly too, I'd say an acceleration comparable to gravity, since running is just falling forward, right?
Don't model the character as a hovercraft, because he isn't one.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
Quote: Original post by ponyboy32
I'm trying to get my players to do this and I thought that's how the arrive steering behavior worked, ie. decelerate before the arrival point so you don't overshoot it. It doesn't seem to be working that way and I'm having a hard time figuring out why. Any ideas?
Roughly speaking, the speed at which you approach the target should be proportional to the distance to the target. This means that as distance to target approaches zero, your movement speed will approach zero, and thus you will finish exactly on the point you require (at least, after you fix the division-by-zero crash). Generally this combines with a clamp on top speed to have an actor travel at full speed until they reach a certain distance from the target, where they begin to slow down.
Check them all out, but this one in particular is on-topic.
Arrival
The code is available in Java.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"