Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Splankton on November 06, 2013, 10:40:17 AM
-
Hi,
If I have 2 NPC agents that are using a navmesh, how can I set one that avoids the other? Are there any actions that can be used to move around an object that isn't static i.e a NPC ?
-
Hi,
NavMesh agents can avoid each others, there is a setting for this:
http://docs.unity3d.com/Documentation/ScriptReference/NavMeshAgent-avoidancePriority.html
But agents can not avoid moving objects, you can, but you need to write a behavior for this to check what's in front and avoid it while keeping the destination as target. It's definitly not trivial.
Have you looked at other pathfinding on the asset store, maybe ( likely) some propose dynanmic object avoidance.
Bye,
Jean
-
Hi,
NavMesh agents can avoid each others, there is a setting for this:
http://docs.unity3d.com/Documentation/ScriptReference/NavMeshAgent-avoidancePriority.html
But agents can not avoid moving objects, you can, but you need to write a behavior for this to check what's in front and avoid it while keeping the destination as target. It's definitly not trivial.
Have you looked at other pathfinding on the asset store, maybe ( likely) some propose dynanmic object avoidance.
Bye,
Jean
Excellent thanks Jean.
-
Hello,
I know this Topic is old but just wanted to share my workaround for this that I found on Unity forums, just set a Random priority from 1-100 on start, I did this and now Navmesh agents dont face each other stuck forever.