It works great!
I've gotten to the stage where I want to start making some AI actually use the navigation mesh to find the player - always I good point to be at.
Now this is where the problem arises:
I have to somehow determine which polygon in the mesh contains the player and each-and-every AI entity.
( So I can find the path from the entity to the player )
Regarding my "Meshes"
- All of the navigation-mesh's polygons are convex, containing up to 15 vertices
- A "polygon" is nothing more that a collection of the vertices, and in turn triangles, that make it up, and "pointers" to its neighbors.
I don't know if I should do some sort of ray-cast, compare distances, or some other approach.
- Can be accurately done (my polygons follow a winding order)
- Could be very expensive
- Has to be done for each and every triangle and entity
- Not nearly as accurate
- How would I even get this to return tangible results?
So, I'm stuck as to which approach to choose, a hybrid solution, or a completely different method...
-or simply put, "How is this usually done, efficiently?"
Any ideas or suggestions would be greatly appreciated
You can see more and get a better idea - PICTURES - of what I'm doing on my blog (the last few posts have been about navigation meshes)
P.S. I'm using XNA, so I have a