Path finding in the 3D environment
Hello for every one...
I search in the internet about path finding i saw alot of but...
Is there any essays or help about how can i apply the path Finding in the 3D environment.
For example :-
In the first person shooter if i was in the second floor on the Building and the enemy saw me so how can lift to the second Floor (there is a stair nearby him) by using the path Finding ????
Is there any approch ? can i design a 3d matrices to get the Solution for this problem ???
Thanks for any information
You can use pathfind algorithm to find the path. Such as A* (A-star).
But repsentin the 3D world to the pathfinder is trickier part where i need help too so hopefully some one else can glarify how it works.
But repsentin the 3D world to the pathfinder is trickier part where i need help too so hopefully some one else can glarify how it works.
Jesus loves you!
Quote: Original post by xor
You represent it as a graph. =)
Think I knew that...
Jesus loves you!
If you want to keep it simple, build a graph of nodes by hand, and connect them by hand.
If you're not fluent with the graph terminology, think of nodes as "intersections or turnings" and edges as "street segments".
From that, think as if you were in a multi level parking lot.
Say you're on the first floor, and want to reach a parking place right where you are, but on the third floor. What you would do, is find the combination of "straight segments" and "turnings" that's the most optimal to reach that exact position. Since you can't "fly" from a level to the other, there is no "segment" that goes straight from your position to the one on the third floor, you'll most likely search for a ramp and use that, and once on the second floor you'll search for a ramp to the 3rd floor, and from that, a combination of segments and turnings until you reach the desired position.
Since the segments are the only way to reach nodes, your A* search will give you a valid path, using ramps else than trying to go in straight line on the next level.
I hope my English was clear enough and that I didn't over simplify.
The 3D matrices are not really related to pathfinding, you'd better look for graph searches.
So anyway, that was a brief explanation of how to "search a path".
Now, try to search for A star implementations (check out James Matthew's website, especially, try to find his A* explorer, it ships with full source code, this might be helpful to you). Don't be fooled though, A* isn't the only solution around, but it's the one that will always return you the most optimal path.
Anyway, if you need any more informations, let me know
Hope I was helpful
Cheers
Eric
If you're not fluent with the graph terminology, think of nodes as "intersections or turnings" and edges as "street segments".
From that, think as if you were in a multi level parking lot.
Say you're on the first floor, and want to reach a parking place right where you are, but on the third floor. What you would do, is find the combination of "straight segments" and "turnings" that's the most optimal to reach that exact position. Since you can't "fly" from a level to the other, there is no "segment" that goes straight from your position to the one on the third floor, you'll most likely search for a ramp and use that, and once on the second floor you'll search for a ramp to the 3rd floor, and from that, a combination of segments and turnings until you reach the desired position.
Since the segments are the only way to reach nodes, your A* search will give you a valid path, using ramps else than trying to go in straight line on the next level.
I hope my English was clear enough and that I didn't over simplify.
The 3D matrices are not really related to pathfinding, you'd better look for graph searches.
So anyway, that was a brief explanation of how to "search a path".
Now, try to search for A star implementations (check out James Matthew's website, especially, try to find his A* explorer, it ships with full source code, this might be helpful to you). Don't be fooled though, A* isn't the only solution around, but it's the one that will always return you the most optimal path.
Anyway, if you need any more informations, let me know
Hope I was helpful
Cheers
Eric
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement