Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Splankton on November 06, 2013, 10:40:17 AM

Title: how to use a navmesh that can avoid moving objects?[SOLVED]
Post 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 ?
Title: Re: how to use a navmesh that can avoid moving objects?
Post by: jeanfabre on November 07, 2013, 12:17:38 AM
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
Title: Re: how to use a navmesh that can avoid moving objects?
Post by: Splankton on November 07, 2013, 11:23:30 AM
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.
Title: Re: how to use a navmesh that can avoid moving objects?[SOLVED]
Post by: Phuzz on August 31, 2015, 12:09:00 PM
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.