In 2D or 3D? If 2D, find your NavMesh's Navigation Mesh Inspector, and check Attempt to move around characters when pathfinding?, and make sure your NPCs have Circle Colliders on their base object.
That's more tricky. If your NPC always stands in the same place, you can just add a hole in your NavMesh. Otherwise, you can look into attaching a NavMesh Obstacle to your NPC, though you'll also have to make sure you're using Unity Navigation as your pathfinding method. I can't speak for the success of that, but I shall have a look into that myself.
I'm afraid that the npc doesn't seem to be getting out the way I'm afraid and just walks through my character even with the circle collided on the base object. Plus the Nov shows through my player when he is behind him therefore not adhering to the sorting map? They r both set to 0
The NPC won't get out of the way unless you check Keep out of Player's way? in their Inspector. The steps I gave above cause the Player to move around the NPC. You do not need a Box Collider on your Player, but you should have a Circle Collider at his feet + a Rigidbody2D.
ok this seems to work now, however, when I do bump into them, and the NPC is on a path, it throws them off it and they just stand still, and to avoid me they can walk outside of the nav mesh?
any reason as to why this happens?
Plus, the biggest bugbear of all is that I can't seem to get the sorting layers correct so that I'm not standing on there heads when i'm behind them?
The NPC needs to be standing still for the Player to be moving around them. NPCs shouldn't leave the NavMesh - you're using v1.49? There are some issues reported with 2D NavMesh's that I'm looking to fix ASAP.
As for the Sorting Map issue, I need to know more about it. Please post screenshots of how you've set up your Sorting Map, and your FollowSortingMap components - giving me as much detail as possible for me to give you a proper solution.
The NPC shouldn't try to evade the player if they're already moving on a Path. You might need to send me the scene so that I can see this for myself.
Does the sorting issue only occur when both characters are in the same vertical sorting region, or also when they're in separate? Check that the sprites are indeed what they should be: i.e. 1 when at the top, and 9 when at the bottom. If two characters are both in the same region, you should see their sprite child's be offset ever so slightly in the Z-axis (e.g. 0.001) to correct the display. Is this happening?
Comments
As for the Sorting Map issue, I need to know more about it. Please post screenshots of how you've set up your Sorting Map, and your FollowSortingMap components - giving me as much detail as possible for me to give you a proper solution.
Does the sorting issue only occur when both characters are in the same vertical sorting region, or also when they're in separate? Check that the sprites are indeed what they should be: i.e. 1 when at the top, and 9 when at the bottom. If two characters are both in the same region, you should see their sprite child's be offset ever so slightly in the Z-axis (e.g. 0.001) to correct the display. Is this happening?