# Please teach me a method to let units avoiding obstacle(units)

**URL:** <https://forum.kirupa.com/t/please-teach-me-a-method-to-let-units-avoiding-obstacle-units/319860>\
**Category:** programming\
**Created:** [March 7, 2011, 7:45am UTC](https://forum.kirupa.com/t/please-teach-me-a-method-to-let-units-avoiding-obstacle-units/319860 "2011-03-07T07:45:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![formns](https://avatars.discourse-cdn.com/v4/letter/f/278dde/32.png) [@formns](https://forum.kirupa.com/u/formns)\
**Post date:** [March 7, 2011, 7:45am UTC](https://forum.kirupa.com/t/please-teach-me-a-method-to-let-units-avoiding-obstacle-units/319860/1 "2011-03-07T07:45:12Z")

</div>

Hi, I’m not native English speaker so I don’t speak English well but please understand it.

I’m just making RTS game and I finished putting units and that a unit could move.  
And I implemented a game-map with a “Graph”.  
I had units learn to avoid the not-moving obstacles, using A\* algorithm for a graph.

But needs to have units avoid the moving obstacles appear!  
They were ,for instance, units, in the direction of travel.  
I cant use A\*algorithm for such moving units,  
so that I use the method “Obstacle Avoidance”(…of Steering Behaviors of Mr.Reynolds)

But units came to “vibrate” hardly.  
I apply a method that vibration become smooth by averaging the heading of units,  
but it not worked well.

So, I want to be taught a method that units come to avoid the not-moving and moving obstacles smoothly.  
I’m sorry when there is a thread of the topic that looks like this,  
I’m glad to teach me the thread.
