Skip to main content
GameDev.net gamedev.net
🔒 Locked

Navmesh pathfinding, efficient route

Started by MrBob Oct 13, 2009 at 10:43 PM 2 replies 3.7k views
Original Post
MrBob
MrBob
I have a navmesh that works well based on navigating via the center point of the triangle. i want a more efficient route. take for instance a corner. right now my character has to move to the center of the triangle, taking him "way out" of the way that i want him to go. idealy i want the toon to hug the corner. the other issue is the jagged path it creates when moving across the board. I thought about giving weights to try and smooth the path out, but that wouldn't do anything for a hard corner. thanks for any thoughts.
A priest, a rabbi, and a monkey walk into a bar. The bartender says," hey whats going on here, is this some kinda joke?"
JDS0
JDS0
See this powerpoint on navmeshes, which addresses your question on slide 38, "Finding the next corner."

Good luck. Also, do you have any better way to create a navmesh?
MrBob
MrBob
Normally i just pull out the polygons that form the flat surfaces and ID them as the navmesh. it works for most areas unless you want some kind of hint system so the AI know to Climb at points or duck (the list goes on for hints).

I hand jam most of my stuff. im sure some of it could be automated, but this way works pretty well for me.

thanks by the way the power point was great.
A priest, a rabbi, and a monkey walk into a bar. The bartender says," hey whats going on here, is this some kinda joke?"
jacksaccountongamedev
jacksaccountongamedev
To find the quickest path (ie hugs the corners) through a channel of triangles you would use the ‘Funnel Algorithm.’ There have been a few posts in the Artificial Intelligence forum recently about this, which include some good references. See here, and here. It is the method described visually in the PowerPoint presentation the previous poster linked you to, but it is usually performed at the time you run A* and repeated until the entire path is found, as opposed to a step which you constant perform as your agents walk the path as is shown in the presentation.

Hope this helps,
Jackson Allan

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.