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
3
votes
1 answer

Unity - NavMesh won't bake stairs

i have a huge problem while baking a stairs 3D model with my NavMesh in Unity 2019.3.12f1 for macOS. Simply the stairs won't get part of the NavMesh as i expect. Of course the stairs are static and walkable. Do you know how can i correctly bake such…
I Don't Tell
  • 264
  • 1
  • 15
3
votes
0 answers

How to create a NavMeshAgent Pathfinder for 3D "flying" enemies in Unity

Is there a way to code in NavMeshAgent to work in 'air' inside Unity such that an enemy AI can follow the character up and down without the need to create a floor or multiple floors? My code only works for 3D on 'ground' characters and not on…
3
votes
1 answer

How would I implement navmesh pathfinding into this AI following code. C# Unity

I have this code that makes the enemy follow my player(And attack etc) but im not sure how to add navmesh into this so it can navigate obstacles. Currently, it goes forward and gets stuck on walls and obstacles. I have never used navmesh…
user7214612
3
votes
1 answer

Getting closest possible destination - Unity3d

I'm trying to understand how to get the closest to a destination with Unity's navigation system when a Nav Mesh Obstacle is in the way. I have this example with a Capsule obstacle (with Carve on) and a capsule agent managed with a script. It seems…
Manatax
  • 4,083
  • 5
  • 30
  • 40
3
votes
1 answer

What is the difference between configuration of agent in 'Agents' tab and in 'Bake' tab Unity?

In Unity, when navigate to the Window > Navigation, I see that in both Agents tab and Bake tab have configuration for the agent. They are agent's radius, height, max slope and step height. Why they exist in both 2 above tabs? Specifically, my map…
3
votes
0 answers

Failed to create agent because it is not close enough to the NavMesh

I have third party package which is making nav mesh agent dynamically. But it showing this warning as it create Failed to create agent because it is not close enough to the NavMesh UnityEngine.Object:Instantiate(GenericIndividual) …
Muhammad Faizan Khan
  • 10,013
  • 18
  • 97
  • 186
3
votes
1 answer

How can I efficiently implement raycasting through a 2D mesh?

I'm implementing a nav mesh pathfinding system and I need to be able to raycast between two points in the mesh and get a list of all edges crossed by the ray. Obviously I'll need to be able to test for individual line intersections, but I expect…
SilentSin
  • 1,026
  • 9
  • 18
3
votes
2 answers

Unity NavMesh Make multiple enemies take different paths

I am working on a game where I have multiple enemies all moving towards the same target. The problem that I have is that all of the enemies are taking the same path to get to this target, which results in an unrealistic "bunching" of the enemies. My…
Andrew
  • 33
  • 1
  • 5
3
votes
2 answers

What is a NavMesh in Unity?

I want to know about the NavMesh present in Unity3d. Why is it used? What features does it provide to a game developer?
user3204779
2
votes
0 answers

Effective way to make NavMeshAgents jump/climb obstacles in Unity?

So I'm working on a zombie game and I want my zombies to be able to climb/jump over certain obstacles around the map. I know that I can create nav mesh links to achieve this but when doing it it feels forced as the zombies will go to the link to…
The702Guy
  • 31
  • 2
2
votes
0 answers

Navmesh Agent limited movement to 1 tile

I have a navmesh agent with a set detination to a target, and a Navmesh surface generated using the NavmeshSurface script component. A few weeks ago I had problems with the agent set destination. Now I realised that my agent will only move to it's…
Fanre5
  • 31
  • 2
2
votes
1 answer

In unity, baking a nav mesh at runtime for a second time causes the navmesh to only partially build

I am currently designing a maze game in unity and have some enemy AI which chases players around the maze. If the player gets to a certain tile on the maze it'll generate a new maze with slightly larger dimensions. I've been using the unity AI…
sler
  • 974
  • 1
  • 11
  • 19
2
votes
1 answer

Which navigation methods would be the most performant and flexible for a game with a very large number of AI on a dynamic playfield?

I'm not 100% sure what factors are important when deciding whether to use Unity's NavMesh vs an advanced pathing algorithm such as HPA* or similar. When considering the mechanics below, what are the implications of using Unity's NavMesh vs rolling…
2
votes
0 answers

SetDestination() sometimes does not work on NavMeshAgent with incomplete paths

In most cases, when I call SetDestination() on a NavMeshAgent to go to a location that no complete path exists, the agent will go as close to the location as possible and then stop. When I try to run SetDestination() continuously in an agent's…
Roger Wang
  • 565
  • 2
  • 12
  • 30
2
votes
0 answers

Getting warning "Failed to create agent because there is no valid Navmesh" using Unity

I'm using procedural mesh geometry and I've set Navigation Static 'On' in the Navigation Window. I've also set the mesh generator to 'Static' in the inspector. I also baked my enemy's agent, but it is still throwing the warning "Failed to create…
1
2
3
14 15