Questions tagged [navmesh]

From wiki: A navigation mesh, or navmesh, is an abstract data structure used in artificial intelligence applications to aid agents in path-finding through large spaces.

A navigation mesh, or navmesh, is an abstract data structure used in artificial intelligence applications to aid agents in path-finding through large spaces. Meshes that do not map to static obstacles in the environment that they model, offer the additional advantage that agents with access to the mesh will not consider these obstacles in path-finding, reducing computational effort and making collision detection between agents and static obstacles moot. Meshes are typically implemented as graphs, opening their use to a large number of algorithms defined on these structures.

224 questions
17
votes
3 answers

What would cause a NavMesh agent to compute an invalid path?

Description of the problem I am struggling with my NavMesh Agents computing an invalid path while there is obvisously no reasons. The problem occurs from time to time when they are already moving with an initial valid path. On the above image, the…
Hellium
  • 7,206
  • 2
  • 19
  • 49
12
votes
3 answers

How to make gameplay ignore clicks on UI Button in Unity3D?

I have a UI Button (using UnityEngine.UI). However, clicking on the Button seems to be clicking through onto the scene (in my case clicking a nav mesh). How to solve this problem? I've been using typical Unity3D code to get user in put in gameplay…
Peter
  • 330
  • 1
  • 4
  • 18
6
votes
5 answers

Unity Nav Mesh : find nearest position on a circle

Imagine that an archer needs to be at least 3m away to be able to shoot his target, but he cannot be further away than 10m. So he must find a valid location inside this radius (in 3d of course). So, what I need is a method that returns me the…
6
votes
2 answers

Can Unity NavMesh be used to implement an A* algorithm?

I'm looking forward to use A* pathfinding for a game I'm working on. (I'm actually making a game for myself to learn about this). I am wondering how the Unity NavMesh can be used with a custom A* algorithm, instead of using a NavMeshAgent.
Rob
  • 61
  • 2
6
votes
2 answers

Given a start and goal ,how to find the shortest way in a navigation mesh?

I googled "A* algorithm on navigation mesh" only to get wrong ways to estimate g-values,like this or this By summing up the length of the blue line segments ,we get the g-value ,but it's overestimated (g-value should be underestimated). This…
iouvxz
  • 89
  • 9
  • 27
5
votes
0 answers

Unity3D NavMesh: shortest path to an area

Consider the following situation. There is a predefined area inside NavMesh that AI agent must reach. For convenience - it is circular area. To find the closest point of the area is pretty straightforward task. No, I need to find the shortest path…
Xamtos
  • 173
  • 9
4
votes
7 answers

NavMesh won't bake at all

I've attempted to bake a Navigation Mesh in Unity3D on a plane with no success. I haven't had this problem until recently, around the 2020.1 release date. I set the plane to navigation static, walkable, and baked the navigation mesh with the plane…
Isaac Thompson
  • 75
  • 1
  • 1
  • 7
4
votes
1 answer

Unity Nav Mesh Agent Destination Invalid?

Having an issue i think i know why it is happening but not the correct way to get around the issue. My Nav Mesh agent picks a random point in a circle and walk towards it for a random amount of time, when the position is valid it looks normal like…
4
votes
1 answer

NavMeshAgent in unity not working

I am making a game in unity and it is throwing the error "Failed to create agent because there is no valid NavMesh" and i don't know what the problem is. using UnityEngine; using System.Collections; public class EnemyMotion : MonoBehaviour { …
Marcus Mardis
  • 83
  • 1
  • 1
  • 8
4
votes
2 answers

Tracking a game object transform - Why using FindGameObjectWithTag doesn't work?

I'm following a tutorial (precisely the survival shooter), and I am at the stage to implement the NavMesh. Their original script is like this: Transform _player; NavMeshAgent nav; void Start() { _player =…
codingadventures
  • 2,924
  • 2
  • 19
  • 36
4
votes
1 answer

Two NavmeshAgents doesn't collide eachother

About the problem: I have got a Player that has two scripts attached(PlayerController and Entity), a RigidBody(isKinematic checked, no gravity), NavMeshAgent and SphereCollider. Then I have got two exactly the same Enemies that have two scripts…
Power
  • 141
  • 1
  • 11
4
votes
1 answer

Unity 3d Nav Mesh baking

My question refers to NavigationMeshes, I have prepared a Map Generator that is grid-based. I can generate a map that consists of cubes that are divided into walls and floor. after generating this i can keep it as a prefab, later in the navigation…
4
votes
1 answer

Can I use Unity 3D navmeshes for 1st person navigation?

I developed some applications that allow the user to explore an interior environment in 1st person and, in order to obtain a smooth walking while dealing with all the collisions with walls and objects my scripts grew in complexity so, premising that…
Steak Overflow
  • 7,041
  • 1
  • 37
  • 59
4
votes
2 answers

Unity NavMesh Obstacle

I try to create an RTS game in Unity and I have a problem with path-finding. I use NavMesh for path-finding and it works well: units avoid static objects. But units don't avoid each other. There is a component called NavMesh Obstacle to units can…
racz16
  • 198
  • 2
  • 8
3
votes
1 answer

How to add Navmesh to existing Aframe (v1.3.0)?

I don't want the player to go through walls. I tried aframe extras but it doesn't work in current aframe version. Is there any other way or solution that works in Aframe 1.3.0?
Yücel Aydın
  • 45
  • 1
  • 6
1
2 3
14 15