Game Development Community

AI vehicle question

by Christin Stock · in Technical Issues · 09/21/2008 (5:26 pm) · 2 replies

Hi, everyone. I am using a AI vehicle tested in my project.

I wanted to make the vehicle move from point A to point B using SetAimObject(). The problem is that both A and B is on the ground, but there is water channel between A and B. So the vehicle will go through the water if it go straightly from A to B.

Actually we can not put a car into water. So I need to make the car move following a curve which avoid dropping into the water. Is there any solution to implement this? Thanks a lot.

P.S: I don't want to use path marker, 'cause point A and B are randomly defined in the scenario. Also I apologize that I cannot upload pics to show my problem. Hope you can understand what I said:)

#1
09/22/2008 (4:03 am)
You may want to divide your scene into sectors, and then use the A* (A-Star) algorithm to generate a path to the vehicle's destination.

Anyway, A-Star is a very widely used pathfinding algorithm, you'll find loads of references to it in a web search.
#2
09/23/2008 (6:27 pm)
Thanks for your advice. I'll try that!