Forum rules - please read before posting.

Beginner problem: Weird "jolting" when moving near holes in navmesh

Hello people!

I've tried adjusting different parameters that might affect the smoothness of character movement, the accuracy of pathfinding and whatnot, but with no luck: When I move around holes in default navmesh, the character makes this slight staggered motion before moving around the holes in the navmesh. Any tips what might be causing this? Not sure what other information I should provide here. Here's a video showing the jolting:

http://dfastmusic.net/thesis/navmesh_hole_clunky.mp4

I don't have this problem in my other test scenes yet the settings are pretty much the same. Just trying to understand what might be causing this sort of behaviour. Thanks beforehand for any tips and suggestions!

Comments

  • Could you share a similar video with Gizmos enabled in the Game window?  It's not clear if this is an issue with the NavMesh or the Player.

    Also: a good tip whenever problems are had like this is to replace your Player with the 2D Demo's (Brain2D) by dropping him into the scene before running.  That way, you can determine if the issue lies with the player or the scene.

    How large is your Player compared with Brain2D?  The game's scale also affects pathfinding accuracy.
  • edited July 2017
    The character is half the size of the Brain2D.

    Here's a video with gizmos enabled. You can clearly see that the character does this weird stagger whenever it sets the pathfinding around navmesh holes. I tried doing this with Brain2D as well but the same staggering happens even then.


    The stagger happens every time the character sets the path to go around a corner.

    EDIT:

    I tried making a new scene from scratch. Seems that the stagger happens every time the navmesh and/or hole have some complexity to it.
  • So I'm clear, you're referring to what looks like a "frame skip" whenevever you click to walk to a new path, correct?  Not the actual movement around a hole itself.

    This is down to the pathfinding algorithm having to calculate a new path each time, which is exponentially more complex with the total number of vertices a NavMesh has.

    As I can't see the whole NavMesh in the video, roughly how many does the scene have - holes included?

    As a rule, you should always keep a NavMesh's vertices to the minimum required.  The bottom-right corner of the hole at the start of the video, could be simplified by merging a couple of the vertices.

    Also make sure that your NavMesh's Character evasion setting is set to None, as this will allow AC to perform further caching for better performance.
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.