All Projects → SharlatanY → NavMeshSurface2DBaker

SharlatanY / NavMeshSurface2DBaker

Licence: MIT License
NavMeshSurface2DBaker is a Unity Package that provides functionality to bake 2D colliders into NavMeshSurface components.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to NavMeshSurface2DBaker

NavMeshDemo
Unity client navmesh export to server for pathfinding
Stars: ✭ 31 (-6.06%)
Mutual labels:  pathfinding, navmesh
NavMeshAvoidance
Custom Nav Mesh Avoidance to replace default one in Unity.
Stars: ✭ 32 (-3.03%)
Mutual labels:  pathfinding, navmesh
unity-pathfinding
Find paths in Unity Tilemaps with A* Search
Stars: ✭ 70 (+112.12%)
Mutual labels:  pathfinding, 2d
surfacer
AI and pathfinding for 2D-platformers in Godot.
Stars: ✭ 56 (+69.7%)
Mutual labels:  pathfinding, 2d
PathFinding
C# project. Realized a visualization of the pathfinding algorithms using Console (2D version), Windows Forms (2D version) and WPF (2D and 3D versions)
Stars: ✭ 18 (-45.45%)
Mutual labels:  pathfinding, 2d
Navmeshplus
Unity NavMesh 2D Pathfinding
Stars: ✭ 347 (+951.52%)
Mutual labels:  pathfinding, 2d
astar-gridmap-2d
A* algorithms for 2D gridmaps. The fastest one, until you prove me wrong
Stars: ✭ 43 (+30.3%)
Mutual labels:  pathfinding, 2d
windowjs
Window.js is an open-source Javascript runtime for desktop graphics programming.
Stars: ✭ 2,223 (+6636.36%)
Mutual labels:  2d
pydstarlite
Python D* Lite
Stars: ✭ 24 (-27.27%)
Mutual labels:  pathfinding
rpg
OpenGL cross platform topdown 2d magic action rpg game single player arpg
Stars: ✭ 20 (-39.39%)
Mutual labels:  2d
WorldSim
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
Stars: ✭ 19 (-42.42%)
Mutual labels:  2d
EQEmuMaps
EQEmuMap .map and .path reference files for the internal EQEmu Server functions
Stars: ✭ 15 (-54.55%)
Mutual labels:  navmesh
hierarchical-pathfinding
Implementation of Near-Optimal Hierarchical Pathfinding (HPA*) algorithm in Unity, tested with maps from Dragon Age: Origins
Stars: ✭ 90 (+172.73%)
Mutual labels:  pathfinding
deno-canvas
Canvas API for Deno, ported from canvaskit-wasm (Skia).
Stars: ✭ 124 (+275.76%)
Mutual labels:  2d
super-sphere
A minimal action game by Kenneth Reitz.
Stars: ✭ 37 (+12.12%)
Mutual labels:  2d
vector2d
2D Vector Library. Operates using Objects, Array or Float32Array types to allow flexible performance.
Stars: ✭ 28 (-15.15%)
Mutual labels:  2d
framework
The exomia/framework is used for building 2D and 3D games and more inspired by the XNA/Mono framework.
Stars: ✭ 21 (-36.36%)
Mutual labels:  2d
skyline
Some canvas experiments... like drawing a procedurally generated skyline. Also featuring fun explosions :D
Stars: ✭ 24 (-27.27%)
Mutual labels:  2d
spatialmath-matlab
Create, manipulate and convert representations of position and orientation in 2D or 3D using Python
Stars: ✭ 142 (+330.3%)
Mutual labels:  2d
ClothSimulation
Basic cloth simulation using Verlet integration
Stars: ✭ 432 (+1209.09%)
Mutual labels:  2d

NavMeshSurface2DBaker

About

NavMeshSurface2DBaker is a Unity Package that provides functionality to bake 2D colliders into NavMeshSurfaces, which are part of the Unity NavMeshComponents.

Prerequisites

Usage

  1. Put Surface2DBaker script on same GameObject as your NavMeshSurface.
  2. Make sure RenderMesh used for NavMeshBaking has a z-position value between 0 and -1.
  3. Add all components that contain 2D colliders you want to bake to "Objects Containing Obstacles". It is enough to add the root object, the script will automatically also search for colliders in children
  4. Set the NavMesh agent selected in your NavMesh surface to an appropriate size and check if all the baking settings on the Surface2DBaker component are as you want them. Check the tooltip if it's not clear what a setting does.
  5. Press the "Bake 2D" button. Your NavMesh will now be generated.

FAQ

What collider types are being supported?

  • BoxCollider2D
  • CircleCollider2D
  • PolygonCollider2D
  • CompositeCollider2D
  • TilemapCollider2D (For those to work, you have to make them part of a CompositeCollider2D, though!)

Baking takes a really long time, even for a small map, why is that?

Your NavMeshAgent radius is probably way too small. Experiment with the radius until you find a radius that's as big as possible while still giving you accurate results.

The resulting mesh is very inaccurate, why is that?

Your NavMeshAgent radius is probably too big. Experiment with the radius until you find a radius that's as big as possible while still giving you accurate results.

Why didn't you implement a new NavMeshSurface script? Why do we have to use 2 components?

While the NavMeshSurface script and its editor counterpart are open source, they contain a lot of code and they have been changed many times in the past. If I modified this code, I would have to update my project every time Unity changes any of those components. By writing my own component and only using public methods of the NavMeshComponents project, I hope to keep a high level of compatibility with future versions and the need for changes on my side to a minimum.

Known Bugs and Limitations

  • If you are using this tool with tile maps and have non standard colliders and a comlpex setup, you might run into some errors that unfortunately haven't been solved yet and likely never will be, see here. In that case I would recommend you use NavMeshPlus, which was explicitly made to work with Unity tilemaps and won't run into this problem.
  • When using rotated colliders that have parent objects which are scaled, you can run into problems if those parent objects aren't scaled uniformly (every axis being scaled by the same amount). These can cause the cut out shapes on the NavMesh to not have the same shape as the original collider/obstacles and is caused by skewing. For some more explanation about skewing, see here, here and here. Since this problem shouldn't happen in too many cases to begin with, it's easy to work around the problem and also because it would be quite an effort to solve this, I'm currently not planning on implementing any solutions to this.

Compatibility

Current version tested with:

  • Unity 2019.1.0f2
  • Unity NavMeshComponents 2018.3.0f2

3rd party components provided with project

Major Updates

  • April 22, 2019: Added support for scaling and rotation, added support for CircleCollider2D offsets
  • April 20, 2019: Added support for clockwise oriented polygons
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].