-
Contributor
Trade Feedbacks
Recast/Detour - Silly to increase agent radius to not hug corners?
All-
First - I'd like to thank everyone for all of their help getting me going w/recast+detour, it's working quite well
Now i'm just trying to improve it even more heh.
I know there are issues w/adding dynamic objects after the fact, which is related in this video, but I'd rather just understand how I can get detour to give me a mesh that isn't the exact shortest distance, but rather close.
Right now my toons are hugging walls way too much. I have an agent radius set to 0.2951389f. Would it make sense for me to increase this (and change other parameters etc... like cell size...)? Or should I just increase cell size from 0.3 to something like 0.5 (and change TileWidth etc.... accordingly). My main concern is there may be some walkways that I may not be able to navigate now (caves?), but this is probably less than 1% of the world, I would think.
Thoughts? How have others figured this out?
Here is a video of the problem (Note: I know that the posts are dynamic objects, which is a different issue altogether, but if you notice where it clicks, it's damn close to the edge): Recast/Detour - Stormwind pathing fail - YouTube
Thanks!
~ Tanaris
-
Knight
Trade Feedbacks
correct me if i'm wrong but wouldn't increasing the cell size mean the exact opposite?(aka less precise paths)
i'm not into recast+detour,just following the threads posted by Tanaris in the last couple of days to learn from it and maybe use it later too
Last edited by streppel; 12-29-2011 at 12:39 PM.
-
Contributor
Trade Feedbacks
Well I could just increased my walkable radius to 2, vs. 1. The only issue is I may not be able to navigate some caves, of course I don't know where.
I wish I could just increase it by 0.25, vs. having to change every other parameter as well.
Anyone have any other solutions besides increasing the walkable radius to where the mesh starts further away from obstacles?
---------- Post added at 12:59 PM ---------- Previous post was at 12:46 PM ----------
Here you can see w/an increased radius of 2 for my mesh, still hugs the corners quite close, and runs into chairs + the stairway (which is in the data when I view it in RecastDemo):
Recast/Detour - Taking corners too tight - YouTube
Edit: I'm realizing that increasing the agent radius is definitely not a solution. It seems like I would need to edit the nature of Detour to not take corners to close, instead, if room permits, it should almost make a circle around the corner.
Has anyone worked to do this?
Last edited by Tanaris4; 12-29-2011 at 01:07 PM.
-
Contributor
Trade Feedbacks
Have you an appropriate visualization of your mesh? It seems to me that the input geometry is somehow translated by fractions of a yard...
The stairs scene is just impossible to explain otherwise. Those two waypoints are not even in "line of sight"...
-
Contributor
Trade Feedbacks
Sure do:

Note: this is with agent radius at 2, vs. 1 (the video is w/it at 2)
-
Contributor
Trade Feedbacks
Just recognized that waypoint visualizer in your upper right corner... Is that path generated by recast and in sync with what actually your bot operates on internally?
If so, it seems like you are skipping important nodes. You should check your ctm interaction distance and stuff.
-
Contributor
Trade Feedbacks
CTM distance is set to 0.5, not worried about that. And yes, it draws the route based on what is given to me by detour, so I know the visualizer isn't the problem. It just takes an array of waypoints.
Edit: You are correct, I was removing some waypoints, fixed it and it's much better. Although I would still like to be able to specify a margin if possible.
Last edited by Tanaris4; 12-29-2011 at 02:34 PM.
-
Sergeant Major
Trade Feedbacks
What you're referring to is steering behaviours, and it's a whole extra level of research/work on top of straight up path-finding. The detour algorithms are designed to give the shortest path with no regard for how 'natural' it looks afterwards. However, Mikko (the library's author) has done a lot of research into natural steering as well I believe. You could try his blog Digesting Duck for some musings on the topic.
-
Contributor
Trade Feedbacks
The short answer is no, you cannot specify a minimum wall distance with Recast and Detour in the manner you specify. adaephon is correct that what you're talking about are steering behaviors. These are another matter entirely.
-
Contributor
Trade Feedbacks
You can use the "Distance to Wall" example given with Recast; If the distance is not great enough, you can attempt to steer away from the wall given.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks