Jump to content
  • Advertisement
Sign in to follow this  

Steer Behavior : full speed arive goal point

This topic is 4485 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi there i find myself is now in a dilemma : my character cannot arrive at its goal point as naturally as it should be, either slow down its speed along the way to goal point or run around its goal unstoppablly. the desired hehavior is the character runs at full speed reach goal point then stopped. reasons for the two different behaviors are probably the following :

1.  slow down to arrive at goal point

    const vec3 desired = dest - position();
    const vec3 steering_force = desired - velocity();

// from above formula we know : the character does slow down its speed to try 
// to arrive at goal point

2.  run around goal point unstoppably 
    const vec3 desired = dest - position();
    const vec3 steering_force = max_force * normal(desired);

// from above code we see the character will never reach its goal unless
// character's velocity is almost co-line with the desired direction.

i'd like to hear any advice or how you get around this in your experience, thank you very much.

Share this post

Link to post
Share on other sites

I suggest you to look at the documentation and Java applets by Craig Reynolds.


The base idea is to scale the steering force in function of the distance to the target. You need a value which is the maximum braking distance.

desired = dest - position
steer = desired - velocity

if (max_braking_dist - desired.length <= 0)

steer *= max_braking_dist / (max_braking_dist - desired.length)

In general, honing correct steering behavior takes some time when moving around levels (It may even be painful at times). I have found myself tweaking some vehicle characteristics to have a visually pleasing behaviour within my own navmeshes.

Hope that helps.
Ghostly yours,

Share this post

Link to post
Share on other sites
hi dear ghost, thank you for the suggestion and the very nice explanation, it does help.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!