Hi, I'm having a bit of an issue I can't seem to solve.

When I'm moving my character with a Nav Mesh Agent component, if my character ends up near an NPC that also has a Nav Mesh Agent component, or if my character starts moving when already close to an NPC, my character litteraly pushes the NPC. I can actually drag the NPC all over the town.

And if the NPC doesn't have a Nav Mesh Agent, my character just passes through it.

Is there a way to make the NPCs impossible to be pushed by the player when using Nav Mesh Agent?

I tested several ways, including with the prefabs characters and NPCs from the tutorial assets, only adding a Nav Mesh Agent component to them.

Thanks!
  • I think this is handled by the Priority setting of the agent.
    Did a quick test (with button player controls using navmesh agent) and gave the player a high priority value (99, I think highest value possible) and was no longer able to push others around (with lower priority values) - so, lower value means they have a higher priority.

    The NPC will be able to push the player, though.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ah yes, it works, thank you!

    I'm fine with the NPC pushing the players, but the opposite could have led to pretty weird situations...

    Thanks!
Sign In or Register to comment.