All Projects → OlegDzhuraev → NavMeshAvoidance

OlegDzhuraev / NavMeshAvoidance

Licence: MIT license
Custom Nav Mesh Avoidance to replace default one in Unity.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to NavMeshAvoidance

NavMeshSurface2DBaker
NavMeshSurface2DBaker is a Unity Package that provides functionality to bake 2D colliders into NavMeshSurface components.
Stars: ✭ 33 (+3.13%)
Mutual labels:  pathfinding, navmesh
NavMeshDemo
Unity client navmesh export to server for pathfinding
Stars: ✭ 31 (-3.12%)
Mutual labels:  pathfinding, navmesh
a star on grids
Best practices for implementing A* with a focus on four- and eight-connected grid worlds.
Stars: ✭ 23 (-28.12%)
Mutual labels:  pathfinding
Nav3D
3D Pathfinding and cover system plugin for UE4, using Sparse Voxel Octrees.
Stars: ✭ 58 (+81.25%)
Mutual labels:  pathfinding
AStar
A 2D A Star (A*) pathfinding implementation in C# focused on ease of use
Stars: ✭ 66 (+106.25%)
Mutual labels:  pathfinding
pythonfinder
PythonFinder: Cross Platform Search Tool for Finding Pythons
Stars: ✭ 30 (-6.25%)
Mutual labels:  pathfinding
path demo
An experimental set of pathfinding algorithms for video games
Stars: ✭ 16 (-50%)
Mutual labels:  pathfinding
path planning GAN
Path Planning using Generative Adversarial Network (GAN)
Stars: ✭ 36 (+12.5%)
Mutual labels:  pathfinding
hierarchical-pathfinding
Implementation of Near-Optimal Hierarchical Pathfinding (HPA*) algorithm in Unity, tested with maps from Dragon Age: Origins
Stars: ✭ 90 (+181.25%)
Mutual labels:  pathfinding
tektosyne
The Tektosyne Library for Java provides algorithms for computational geometry and graph-based pathfinding, along with supporting mathematical utilities and specialized collections.
Stars: ✭ 52 (+62.5%)
Mutual labels:  pathfinding
uastar
Minimal A* implementation in C. No dynamic memory allocation.
Stars: ✭ 76 (+137.5%)
Mutual labels:  pathfinding
Pathfinding
A pmmp virion (library) for pathfinding using A*
Stars: ✭ 36 (+12.5%)
Mutual labels:  pathfinding
AI-Companion
Created in Unity 5 for the purposes of learning AI techniques. Features behaviour trees and A* pathfinding.
Stars: ✭ 22 (-31.25%)
Mutual labels:  pathfinding
Pathfindax
Pathfinding framework
Stars: ✭ 20 (-37.5%)
Mutual labels:  pathfinding
gruid
Cross-platform grid-based UI and game framework.
Stars: ✭ 67 (+109.38%)
Mutual labels:  pathfinding
uesvon
3D navmesh generation and pathfinding plugin for UnrealEngine
Stars: ✭ 165 (+415.63%)
Mutual labels:  pathfinding
ml pathfind
Pathfind module for MTA:SA-Server
Stars: ✭ 25 (-21.87%)
Mutual labels:  pathfinding
algoviz
Codebase for educational tool on algorithms
Stars: ✭ 21 (-34.37%)
Mutual labels:  pathfinding
sourcepawn-navmesh
SourcePawn .NAV file reader.
Stars: ✭ 25 (-21.87%)
Mutual labels:  navmesh
surfacer
AI and pathfinding for 2D-platformers in Godot.
Stars: ✭ 56 (+75%)
Mutual labels:  pathfinding

Nav Mesh Avoidance

Custom Nav Mesh Avoidance to replace default one.

Nav Mesh Avoidance

This is simple avoidance implementation to prevent situation when nav mesh agents moving too close to each other. This algorithm is best suitable for average crowds of 10-100 agents. Not tested with bigger amounts.

You can combine this Avoidance with default one (agents will never move through each other) or disable Unity's avoidance (avoidance will look smoother, but agents will be able to move through each other).

How to use

First of all, add Avoidance component to any GameObject (once). Next, when you spawn any agent, you need to add it to the Avoidance class like this:

using NavMeshAvoidance;
using UnityEngine;
using UnityEngine.AI;

public class AvoidingAgent : MonoBehaviour
{
  public Avoidance Avoidance;

  void Start()
  {
    var agent = GetComponent<NavMeshAgent>();

    Avoidance.AddAgent(agent);
  }
}

And now it will work with avoidance of others agents.

You also can disable default avoidance. In this case agents will sometimes move through each other, but in priority for them will be to avoid others. Idea of disabling default avoidance is better navigation without "friction", which can be noticed when using default avoidance and 2 or more agents try to move through other one.

When destroying any agent, dont forget to remove it from avoidance too:

Avoidance.RemoveAgent(agent);

Ordering and Formation

Basic classes added as controls example for agents groups. You can ignore these scripts if you have your own group controls.

Example

Check SampleScene to see Avoidance work example.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].