# 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.

## 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 on other sites
Hi,

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

http://www.red3d.com/cwr/steer/Arrival.html
http://www.red3d.com/cwr/steer/gdc99/

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 - positionsteer = desired - velocityif (max_braking_dist - desired.length <= 0)returnsteer *= 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,
Red

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

1. 1
2. 2
3. 3
4. 4
Rutin
17
5. 5

• 14
• 9
• 10
• 12
• 17
• ### Forum Statistics

• Total Topics
632906
• Total Posts
3009160
• ### Who's Online (See full list)

There are no registered users currently online

×