Forum rules - please read before posting.

NPC keep out of player's way question

Hi Chris,

I have set the scene with unity navigation pathfinding method.
I have set some NPC follow the player, the NPC can follow the player and avoid the walls, it is fine.
I also set some NPC keep out of player's way in their NPC component.
Those NPC can keep out of the player's way but move towards the wall and trapped.

So, is there any way to make the NPC can walk away from the player and also avoiding the walls?
Thanks for your help.
AC version 1.70.4
Unity version 2019.3.0a7

Comments

  • edited February 2021

    What do you mean by "trapped"? Can you share some visuals to show what's going on?

    When this option is checked, the NPC will first try to move directly away from the Player, and - failing that - then try to move sideways. However, they'll still only move within the NavMesh.

    If they're colliding with the walls when on the edge of the NavMesh, try increasing the Agent Radius when baking your NavMesh, so that they can't get so close to the walls.

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.