Forum rules - please read before posting.

NavMesh and Pathfinding

Hi, I need some clarification.
I wanted to try to create a mesh instead of using Unity Navigation and I have some issues.
The pathfinding in some case behaves in a bit strange way and at specific point the character falls. Also, even by reducing the destination accuracy to zero, the character often falls if it run.
I think some problems depend on NavMesh's design. 
So there are rules to follow, such as avoiding too narrow corners or anything else?
In the case of my 2D background I can eliminate the corners in the foreground as I will put the two sprites on the couch and armchair but how can I fix the corner in the background?

This the video:


I've also tried using Collision cube

image

but the character in the corners is no longer able to get out. Also often it continues to walk in place when it collides despite the different Destination accuracy settings I have tried.
"Slow movement near wall colliders" seems to have no effect, the character does not seem to slow down in any way.

My questions would be:
what rules I need to follow when creating a NavMesh?
what must be done to prevent the character from falling off the navMesh?
is it correct to use cube colliders as walls with NavMesh? Do I need to cover the floor with the cube collider as shown in the 3D tutorial?
Thank you



Comments

  • The NavMesh should have vertices only around the edges where possible - without seeing the mesh for myself I can't tell how it's made.  It shouldn't have issues like the ones in the video though, so feel free to send it to me - it'll probably be easier to figure out if I just have it in front of me.

    To ensure the character doesn't fall off, always have a separate collider to act as the floor, and disable collisions for the NavMesh itself.  Due to turning circles etc, it's always possible for a character to occasionally leave the exact boundary of the NavMesh.

    Wall colliders are only necessary if you use Direct movement, and even then they shouldn't be so close to the NavMesh.  When a character navigates, their feet can reach the edges of the NavMesh - so if they have Capsule Colliders on them then the wall colliders will cause them to get stuck.
  • The "BasementNavMesh" model file in the 3D Demo can also be used as reference - you can import it into Blender etc to see how it's made.
  • edited December 2017

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.