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 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #26074

    uservs
    Participant

    Hello. I am testing a pathfinding. And in some cases solution can not be found. Unit uses BasicMotor without Face Target. It goes to static navigation target. In specific case (screen #1) navigator can not build the path (why?). But when the unit was shifted to the left (screen #2) then the navigator was able to build the path.

    screen #1

    screen #2

    #26137

    uservs
    Participant

    Another case.

    #26138

    uservs
    Participant

    Mesh parameters:

    AI parameters:

    #26142

    uservs
    Participant

    I changed the Cell Size to 0.2 and it worked.

    #26236

    CodersExpo
    Participant

    This is awesome. Thanks for the detailed feedback. I know this will help others.

    NOTE ON CELL SIZE: “The resolution of the Navigation Mesh in meters. The higher this value the more accurate the mesh is at small sizes, but the more memory and time it will take to generate. The resolution of your mesh can be calculated by the following equation: size * localScale.x * cellSize * size * localScale.z * cellSize.”

    Another thing to consider, often times people will find when they select the navigation mesh they will see the character standing in an unmasked section where the navigation mesh didn’t cover, especially on rough terrain. It’s a good idea to mess with cell size and step height in these cases.

    Glad to see you were able to work it out!

    #26265

    uservs
    Participant

    Thanks for the reply. But I don’t understand why your LPA was failed at this situation. May be it’s a bug in pathfinding algorithm?

    #26267

    uservs
    Participant

    It generates a more rough mesh with greater values of cell size.

    #26269

    CodersExpo
    Participant

    It’s a good question Uservs. I don’t know. I would suggest emailing Jester for a more specific answer. I do know that it works (for me) to tweak cell settings to get better behavior.

    #26272

    uservs
    Participant

    Based on the formula it is possible to increase the resolution of the mesh size or increasing the local scale without changing the size of the cell. I increased the size of the mesh leaving the cell size equal 0,1. Possible solution but not obvious.

    • This reply was modified 9 months ago by  uservs.
    #26275

    uservs
    Participant

    I have a next problem. The unit is outside walkable area. It walks to target and stucks for unknown reason. In this case navigator cannot build the path.

    • This reply was modified 9 months ago by  uservs.
    #26281

    uservs
    Participant

    It is probably a colliders radius tweaks. But is it possible to restore from this state? For example unit was dropped to unwalkable area. Can unit detect a nearest valid point and go to it?

    • This reply was modified 9 months ago by  uservs.
    #26383

    CodersExpo
    Participant

    If you fall off the navigation grid….hmmmm, I believe you would have to do a little work to get the character back on. Path finding and movement would likely fail.

    You could search for the nearest point, like what you may have seen in the waypath network tutorials, but will then probably have to use Unity’s MoveTowards (http://docs.unity3d.com/ScriptReference/Vector3.MoveTowards.html) target and then allow RAIN navigator to take over again.

    I know there was some discussion on this forum for support of off mesh linking but not sure when that will be implemented or if it would help in this case, though it seems to me that it could.

    #26402

    uservs
    Participant

    Some solution is to reset option Valid Path Required.

    #26471

    CodersExpo
    Participant

    Ah..did that work for you? If so that’s a great tip. Thanks uservs

    #26474

    uservs
    Participant

    Yes, it works for me. May be a custom motor with raycasting is not a bad variant for this task.

Viewing 15 posts - 1 through 15 (of 29 total)

You must be logged in to reply to this topic.