News Forums RAIN General Discussion and Troubleshooting Pathfinding problem

This topic contains 28 replies, has 3 voices, and was last updated by  prime 1 month, 2 weeks ago.

Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
    Posts
  • #26485

    CodersExpo
    Participant

    hmmmmmm… and I could use the example on the wiki. I like it.

    #34869

    uservs
    Participant

    Hello. I have a new old problem. Units cannot find path to target at usual flat surface.

    There is an area inside red lines (screen 1)

    Red buggy area

    No any obstacles at this area.

    Nav mesh area

    White spheres are nav targets for 3 units (selected from user input). Unit’s motor shows “Running” state at BH tree. Also there is huge performance impacts (non regular) at this case (pathfinding?). Units are running at their places infinitely.

    Bug

    #34870

    uservs
    Participant

    Navmesh params (RAIN v.2.7.1.2):

    Params

    • This reply was modified 2 months ago by  uservs.
    #34872

    uservs
    Participant

    I found the solution. Its a magic parameter Step Up Height for motor. Its fully not intuitive parameter that determine the difference between real landscape and approximated by RAIN. Thus, a small hole in landscape was a real problem for pathfinding solution. Perhaps, if the graph is only one, it would be possible to exclude the influence of this parameter?

    #34874

    uservs
    Participant

    And another new small feature. When I set moving target twice (change target while moving) units move forward the target without taking into account obstacles.

    • This reply was modified 2 months ago by  uservs.
    #34878

    prime
    Keymaster

    I wouldn’t say step-up height is a magic parameter - and it doesn’t quite do what you think. What it does impact is how the navmesh is created with respect to how high you think your character can step up, based on its rig. If the difference in height between two adjoining grid cells is greater than the step up height, then they will be disconnected on the graph.

    Step up height also impacts how far below a navmesh your character can get before it no longer thinks it is on the navmesh. If the character base (ai.Body) transform is lower than the (navmesh y value - stepupheight) then the AI will ignore the navmesh.

    When a target is moving, the AI does not ignore obstacles. It does repath, but it continues to walk the previous path until a new path is found.

    I’ll also mention that the distance you are showing between the visualization of the navmesh and the actual ground is pretty much irrelevant. That’s just a visualization issue, so I wouldn’t worry too much about it. You can change it by adjusting the visual height offset.

    We’d be more than happy to take a look at the problems you are encountering and give specific explanations and offer solutions. You could send us over the scene you are experiencing issues with, or you could send us a test scene that demonstrates a similar issue.

    Also, make sure you are running the latest RAIN - we’ve been patching a few pathfinding bugs recently. 2.1.7.2 as of this post.

    Thanks

    • This reply was modified 2 months ago by  prime.
    #34881

    uservs
    Participant

    I set Step Up Height to some large value (100f) and problem was resolved.
    Today I downloaded RAIN 2.1.7.2 package and updated my project from 2.1.6.1. I found new problem with frequent mouse clicks. Each mouse click changes target for Move action through working memory Vector3 variable. After first target selection units are moving correctly. Next 1-2 quick clicks are provide a bug with path planning. Units try to move to the target directly. Unfortunately I cannot send full project for you. Maybe I can do a little test. This bug is new in 2.1.7.2 version. I tested this problem for 2.1.6.1 and bug was not detected.

    #34882

    prime
    Keymaster

    I think we’ll need to see some example or a way to reproduce the problem behavior in order to help. At the moment I don’t know how to reproduce what you are seeing.

    #34884

    uservs
    Participant

    Okey. I have created a test project. How to transfer it to you?

    #34885

    prime
    Keymaster

    You can use

    https://infinit.io/

    and send the link to prime@rivaltheory.com

    or dropbox works too

    Thanks!

    #34991

    uservs
    Participant

    Hello guys. Is there any news about this issue?

    #34998

    prime
    Keymaster

    Based on what I saw in the video - here’s what I think is happening:

    1) There are lots of gaps and holes in your nav mesh, and lots of disconnected pieces.
    2) Many times the AI are not standing on a navmesh when pathfinding starts. In that case, the AI attempts to reverse pathfind from the target back to the AI and picks the closest on-mesh point that it can.
    3) The reverse pathfinding often fails because the closest point is on the other side of a building. Occasionally one of the AI will find a path and correct itself. That happens when the AI “accidentally” moves onto a small piece of connected navmesh and is finally able to generate a valid path.

    It would be useful in the videos to have you show the actual navmeshes that make up the scene. Without them it is hard to tell what’s going on.

    There’s one issue that may be impacting performance we might be able to help with - something I’m looking into and I’ll get back to you on. But again, generally it appears as though the navmesh itself is not good and that the AI is being asked to pathfind from off mesh locations.

    #34999

    uservs
    Participant

    There are holes from houses (obstacles) with colliders. I dont know how to start pathfinding from offgraph place in this scene. Navmeshes in test scene and in my are identical. Units are at walkable places (ongraph) and navtarget too. There is a new problem only in 2.1.7.2.

    Navmesh (identical with test, no recalculation):

    #35000

    prime
    Keymaster

    Yep - you are correct. There’s a real issue here. We’re fixing it right now. Thanks for being persistent on this one.

Viewing 14 posts - 16 through 29 (of 29 total)

You must be logged in to reply to this topic.