# Tag Info

### Is it possible to use nav-mesh in 2d game in Unity?

In case anyone Googles this later, you CAN use nav meshes in Unity. I'm using unity 2018.2 and set up a navmesh in a purely 2D top down tilemap game I'm working on. Check this thread in the Unity ...
Accepted

### What does NavMesh.AllAreas specify in Unity?

TL;DR NavMesh.AllAreas let you compute a path considering all the NavMesh Areas are walkable for your agent. Long answer Areas and costs When you build a ...
• 2,949

### How does heavily constrained delaunay triangulation work?

You're almost there. Once you have a delaunay triangulation of all the points (including constraint points) then: foreach constraint edge: Find all existing intersecting edges in the triangulation '...
• 94
Accepted

### Unity Vector3 position inside collider

Use Collider.ClosestPoint(Vector3 position). From the documentation: Returns a point on the collider that is closest to a given location. Update: Sadly this ...
• 4,785

### Infinite plane with Unity Navmesh agent

From my understanding the Unity NavMesh has to be baked so it's not something you can do in real-time. My advice would be to go and build your own path finding solution using the A* algorithm or ...
• 181

### How to snap a point to the height of the navmesh surface?

I found the function what does exactly what I need: ...
• 251
Accepted

### Creating a nav mesh

TLDR: Which option to use depends on the need. Grid-based maps use navmesh will have additional workload, but the effect is better in most cases. Navmesh is essentially an optimization of a grid-based ...
• 2,771

### How to check if a point is on the navmesh?

I'd find the closest point (NavigationServer3D.map_get_closest_point()) and check the distance between them. If it's on the map, the distance would be approximately ...
• 858

### Funnel algorithm : not possible with all convex polygons?

Edit : After further testing, I found out that a special case of this kind is also needed for triangles in some cases. I probably just incorrectly understood the algorithm ? Maybe it's because this ...

### Is it possible to use nav-mesh in 2d game in Unity?

Bake the Navmesh onto your scene (xz) and emit all things to 2D (xy). ref: Navmesh2D concept
• 21

### UE4 Navmesh precision

A Navmesh is generated according to so-called "Nav Agents". These Nav Agents are located in your Project Settings under the "Navigation System" Settings. There you can create a new Agent or edit ...
• 761
Accepted

### Enemies are penetrating in each other when following player

To avoid penetration, increase each NavMeshAgent's radius so it's equal to or larger than your agent's collider.
• 2,248

### Why are multiple Nav Mesh Agents jittery when the target is inaccessible?

I had this problem and I was messing around with the Nav Mesh Agent and found out turning off "Auto Braking" fixed the problem.

### Infinite plane with Unity Navmesh agent

I know it's quite old one, but you should be able to achieve this with NavMesh Surface It's official created by Unity, but it's not part of Unity though as of now - check that link for how to install ...
• 131

### How to implement jump in NavMesh?

Why it is not working As you said, the function is called as soon as you hit Space. That's why it doesn't work because isKinematic is then instantly reset to ...
• 1,260

### Visualizing NavMesh to Camera

Just want to add to the answer above, if your NavMesh consists of different Areas, you can actually assign your triangle indices to different submeshes using ...
• 121
Accepted

### Visualizing NavMesh to Camera

This should be possible by optaining the triangles from the generated NavMesh. So first you need to bake the NavMesh and then call CalculateTriangulation. This gives you a NavMeshTriangulation object ...
Accepted

### Unity using different NaveMesh for the same position

I'd try to work around this using additive scene loading. Create three different copies of your scene file. In each one, bake a navmesh for one corresponding version of your environment. Then delete ...
• 135k

### Unity navmeshagent and doors

I think what you're looking for is the NavMeshObstacle component. https://docs.unity3d.com/Manual/class-NavMeshObstacle.html https://docs.unity3d.com/ScriptReference/AI.NavMeshObstacle.html
• 81

### How to move NavMesh Agent by animation?

You need to attach this animation to your player gameobject and in code (the third person controller does this as an example) set a variable whenever it's moving and send it to the animator. Then in ...

### Stop character from moving after reach his destination?

You can use a constrain on the rigidbody https://docs.unity3d.com/ScriptReference/Rigidbody-constraints.html Or if the external force is a physic-related one make it cinematic. https://docs.unity3d....

### Stop character from moving after reach his destination?

Could you just set isKinematic on the RigidBody to false once he reaches the destination? This would prevent the rigidbody from being effected by physics, which is kind of like preventing any force in ...

Accepted

### How to find a valid point if NavMeshObstacle is blocking path?

NavMesh.CalculatePath does return you a partial path if it cannot reach the destination. You can try reading the last corner of the path that you get returned. Source: https://docs.unity3d.com/...
• 188

### Why does a 3D scene need to be voxelized before it can be transformed into a navmesh?

DMGregory's point about voxelization's simplicity seems about right. Another reason though, is performance. With these navmesh algorithims, you need a way to reduce the complexity of a scene. ...
• 742

### How to calculate distance for A* when searching a path on navmesh?

When you say you want to calculate the "distance for A*", you mean the heuristic, right? The heuristic is an estimate of the distance. And you want to avoid overestimating it. See Admissible ...
• 27.3k

### Dynamically generating and modifying non-Euclidean/Tardis houses while maintaining AI navigability

Non-euclidean space is actually not as much of a problem for route finding as you would believe. The reason is that most standard route finding algorithms (A* included) do not operate on a grid but on ...
• 121k

### Dynamically generating and modifying non-Euclidean/Tardis houses while maintaining AI navigability

Since you're working with houses, you can leverage the conventions of those structures to simplify the problem. To a first approximation, a house is a collection of rooms connected by doorways and ...
• 135k
Accepted