Advertisement

Steering Behaviors - Obstacle Avoidence[NEW]

Started by April 09, 2006 04:08 AM
3 comments, last by xEricx 18 years, 7 months ago
I have areas on my map (forests and buildings) that are surrounded by walls, and I want the unit to go around them using wall avoidence, the problem is, if it has to get to the other side of a wall like this:

          |
          |
   * ->   |  X
          |
then the unit gets up to the wall, turns back to the right, then goes back to the left... and keeps on doing that. What should I do to prevent this? Thanks. [Edited by - daniel_i_l on April 9, 2006 8:05:35 AM]
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
Usually you'll have 2 systems, a pathfinder and a steering system.

The path finder is responsible for finding a valid path from "a" to "b", while the steering system is responsible to control the unit on its path from "a" to "b".

So basically, the path finder will find a serie of "points" to reach, the the steering system will control the unit to head toward each of these points while avoiding dynamic objects (wall avoidance here is necessary not to avoid dynamic object through static objects, like walls).

I hope this helps...

Eric
Advertisement
Yeah, you need a pathfinding system on top of the steering system because the steering alone cannot take obstacles like that into account. It only has a limited amount of 'vision' and cannot plan ahead to negotiate complex obstacles.
I now did "ObstacleAvoidance" were the obstacles are circles, for come reason the unit didn't move eventhough the box was ontop of an obstacle, why would that be?
Thanks.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
Its hard to tell without seeing code / a demo running...

You should get Mat Buckland's Game AI by Example... steering is very well explained in this book and the accompanying (sp?) demos should help you get a better grasp of the topic.

This topic is closed to new replies.

Advertisement