Recast/Detour - Silly to increase agent radius to not hug corners? menu

User Tag List

Results 1 to 10 of 10
  1. #1
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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
    https://tanaris4.com

    Recast/Detour - Silly to increase agent radius to not hug corners?
  2. #2
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  3. #3
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.
    https://tanaris4.com

  4. #4
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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"...

  5. #5
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure do:


    Note: this is with agent radius at 2, vs. 1 (the video is w/it at 2)
    https://tanaris4.com

  6. #6
    Bananenbrot's Avatar Contributor
    Reputation
    153
    Join Date
    Nov 2009
    Posts
    384
    Thanks G/R
    1/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  7. #7
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.
    https://tanaris4.com

  8. #8
    adaephon's Avatar Active Member
    Reputation
    76
    Join Date
    May 2009
    Posts
    167
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  9. #9
    namreeb's Avatar Legendary

    Reputation
    668
    Join Date
    Sep 2008
    Posts
    1,029
    Thanks G/R
    8/222
    Trade Feedback
    0 (0%)
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    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.

  10. #10
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.


Similar Threads

  1. Path Generator – Recast/Detour and WowMapper – Step
    By RivaLfr in forum WoW Memory Editing
    Replies: 32
    Last Post: 05-13-2022, 05:38 AM
  2. Recast + Detour - Connecting tiles
    By Tanaris4 in forum WoW Memory Editing
    Replies: 12
    Last Post: 12-21-2011, 04:04 PM
  3. Pathing w/Recast + Detour - Potential issue - thoughts?
    By Tanaris4 in forum WoW Memory Editing
    Replies: 0
    Last Post: 12-12-2011, 10:41 AM
  4. Replies: 1
    Last Post: 12-12-2011, 02:31 AM
  5. [Link] C++ Recast/Detour Wrapper
    By Millow in forum WoW Memory Editing
    Replies: 11
    Last Post: 08-02-2011, 04:26 AM
All times are GMT -5. The time now is 05:20 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search