Sunday, March 23, 2008

Dynamic Obstacle Avodance Integration

hi, this task wasn't easy, a lot of tiny things that needed to be fix - as i said in my last post :)
but now i'm very pleased with the result, i can drop any number of dynamic obstacles in the scene and the bot/entity will navigate around them.
one very important thing is to make your bot move smoothly and try to take shortcuts when possible, if you wont do it your bot will move around obstacles edges while you can see for sure he can take shortcut, this will make him looks very unnatural and robotic.
here is some screenshots that shows the system in action:
* purple lines shows the from the precomputed ai data the bot aware of, this is convex area so the bot knows he can walk in straight line to any other point in that area.
* small green sphere, goal position the bot need to be at the end
* medium green sphere is the point the bot will move to on the path resulting from dynamic obstacles system, this point is the result of path smoothing. the yellow lines is the path around obstacles without smoothing.
* white boxes is dynamic obstacles (dynamic rigid bodies in debug mode), the green lines around them is the expanding edges of their box.

Simple scene (1 area) this is what the bot aware of

One obstacle added and path generated from the system

Few more added and you can see the new path generated

stress test - start of movement

stress test - middle of movement.
if you watch closely you can see the bot is not moving along the yellow lines and take shortcuts where possible, this can be seen from the bot direction toward medium green sphere.


Anonymous said...

See here or here

Eddy Luten said...

Oren, saw your screenshots on Gamedev. Amazing work you have here. Will you release the engine once its done or are you doing this solely for the experience?

Excellent work so far.

Anonymous said...