🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

pathfinder for 3d

Started by
2 comments, last by asperitas 21 years, 9 months ago
i am trying to write a pathfinder for a 3d strategy i am working on. The best way i could think of was to split every polygon on the map up into squares of a certain size, so the entire map was split up into squares of the same size. eg. 1x1 unit squares. and each square is either passable or not passable. this way i could hopefully apply a 2d pathfinder to the map. Is there anyone who has tried this and had problems, or is there any reason why it wouldnt work or does anyone know of a better method of approximately the same simplicity.
__________________________Sir Robin the Not-quite-so-brave-as-Sir-Launcelot who had nearly fought the Dragon of Angnor,who had nearly stood up to the viscious Chicken of Bristol and who had personally wet himself at the Battle of Badon Hill
Advertisement
I don''t know what type of maps you have, but if we talk e.g. about FPS-like maps, you will have problems using 1x1 squares, or you need quite a mass of squares to cover the map efficiently, which isnt good for your pathfindingspeed.
If you are splitting your 3D space up into many, many, many cubes, it will take longer for your pathfinding algorithm to resolve a path (no matter which path finding algorithm you use).

If there are "portals" between areas in your 3D space, you might be able to use the portals (windows, doorways, etc.) as edges of a graph and use the spaces that touch the portals a nodes in a graph.

There are many ways to represent areas in a 3D world and connections between them. Waypoints (locations in 3D diminsional space) are a common method of creating paths in a static 3D environment. Waypoints that are visible to each other can be connected by a path (the edge of the graph) which can allow you to navigate from one waypoint to another.

If the 3D world is dynamic where boundries are constantly changing position, waypoints and paths between them won''t work very well. You would need some other method of determining a route between where you are and where you want to be.

Your question is rather vague since you don''t describe what type of 3D world it is (static or dynamic). You would do well to use www.google.com to search for "pathfinding algorithms" or something similar since there''s TONS of information about pathfinding on the Internet.

botman
*welcoming botman here*

Oh, great ol'' botman is taking over another forum.

The question is : Will he somewhen conquer the whole world, or will he run out of time beforehand ?

This topic is closed to new replies.

Advertisement