Forum rules - please read before posting.

Pathfinding/Navmesh accuracy

edited August 2019 in Technical Q&A

I'm working on a 3D game and using Unity Navigation for pathfinding. Most of the time this works well, and it is easy to bake navmeshes inside Unity. However, I notice that the player often gets stuck or do a ungraceful rotational dance when taking steep turns when running. It appears that when using too high destination accuracy, the character overshoots the path, forcing it back a bit - resulting in the rotational dance.
This gets better when turning down accuracy - but this again affects how accurately the character ends up on its end point. Usually the endpoint is very critical, as the character needs to be in a very specific, accurate spot for the scene to make sense.
Is there a way to lower accuracy when moving, but still keeping the super-accurate setting at the end of a path?

Screenshots of calculated path and actual path taken:
https://imgur.com/a/qEWBRLa

https://i.imgur.com/XQw2WLi.png
https://i.imgur.com/xTSsYiJ.png

Update: I tried upping the Pathfinding update time from 0 to 0.04, it seems to have improved a bit. I'll do some more testing and report back

Comments

  • Have a look through the Manual's "Precision movement" chapter if you haven't already, as it gives an overview of the different options you have.

    Of note is the point about Root Motion: if a character's movement is handled by the animation, then you should implement a Blend Tree so that the movement can slow down gradually as the character transitions from Walk to Idle.

    One other thing to try is the use of Unity's own NavMesh Agent component, which overrides AC's built-in movement system when using Unity Navigation for NavMesh generation. To use it, just attach both that and AC's "Nav Mesh Agent Integration" component to the character's root.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.