Path finding ? Can I

Started by
4 comments, last by Kylotan 19 years, 2 months ago
I have a Terrain which is just a single quad but very big. Ihave implemented - picking - collision det and resp. Now, My questions is, How can i implement the A* algo ( that is Can I implement the A* algo on my terrain which is flat and madeup of a single quad.)
Advertisement
You don't have to draw the grid to have units interact with it. So just create a grid for pathfinding and don't draw it.

Hope that helps!
Without order nothing can exist - without chaos nothing can evolve.
A* consists in finding a path in a graph. If you can build a graph from what is on your quad, then you will be able to apply A* to it. Generally, having a grid is an excellent way of creating such a graph, but there are other ways (for instance, creating graph nodes at the corners of polygonal obstacles and linking together nodes which are accessible with a straight trajectory without intersecting other objects).
Quote:Original post by hardik_ce
I have a Terrain which is just a single quad but very big.
Ihave implemented
- picking
- collision det and resp.

Now, My questions is, How can i implement the A* algo
( that is Can I implement the A* algo on my terrain which is flat and madeup of a single quad.)




You say the terrain is one quad, but you will have obstacles ????

Any terrain features ??? Or just the other objects will get in the way ???

If you have alot of moving objects, it might pay to plot them on an artificial grid
and use A*. If there are only a few, then some kind of collision avoidance - dodging/circling around blocking object immediately in front along the path to destination...
--------------------------------------------[size="1"]Ratings are Opinion, not Fact
First of thnx ppl 4 ur rep.

Now, The terrain is a quad just as in the MultiAnimation Eg. incl. in the MS DXSDK 9.0c summer 2004.

Secondly, I have just one static obstacle on it which is a BOX.
(More obstacles will be added)

So, I need a way by which i wont need to change my terrain and still be able to implement A*( or for that matter any other PF algo )

Thnx,
Hardik Malekar ( INDIA ).
The answer was given above; create an arbitrary virtual grid which covers the terrain, mark certain squares as impassible if there are obstacles within them, and use A* on that grid.

This topic is closed to new replies.

Advertisement