Forum rules - please read before posting.

How to - NPC characters use Unity Navigation, but Player use Mesh Collider Navigation?

Can I set the Pathfinding method for NPC characters to Unity Navigation, but my Player character use Mesh Collider?

My NPCs move about correctly on Unity Navigation using the NavMesh, but my player character then won't, or if I set the settings to Mesh Collider, my Player moves correctly to places, but my NPCs get stuck and try walking through walls etc with Collision on.

Comments

  • edited October 2020

    No - all characters must rely on the same NavMesh. The issues you're facing can be worked around, however.

    Wall colliders are generally only necessary if your game involves Direct movement control. If you rely on Point-And-Click movement, your Player only moves according to the NavMesh, so there's no need for wall colliders - or at least those that don't have "Is Trigger" checked.

    If using Unity Navigation with NPCs that can also move around, you may have to add the "NavMesh Obstacle" component to them, check "Carve" and play around with the settings to allow other characters to move around them. It's also possible to rely on Unity's own NavMesh Agent component for character pathfinding - just add AC's NavMesh Agent Integration component as well.

    For more specific advice, you'll need to share more details and screens about the exact issues you're facing.

  • Thanks, hada play around - I have found a way to fix the issue - I'm using the Unity Navigation option, and baked a Nav Mesh.

    My NPC's move to locations and markers using PathFinding ticked (they find smooth routes around objects etc on the NavMesh.... But I have to have my Player move without having PathFinding ticked. The player nolonger turns randomly whenever an NPC changes direction, or glitches when trying to pathfind. :)

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.