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
2
votes
2 answers

Why does NavMeshAgent.remainingDistance return values of Infinity and then a float in Unity for unreachable destinations?

When I set an unreachable target position with SetDestination() for my NavMeshAgent and Debug.Log() the NavMeshAgent.remainingDistance every frame, I get Infinity for some of the path until it starts returning floats (21.21864, 21.0846, 20.95449...)…
Roger Wang
  • 565
  • 2
  • 12
  • 30
2
votes
3 answers

Unity - Navmesh event on navigation end

Is there a way to raise a flag on the Navmesh navigation end, or to use a callback when it finish? I want to run a function when my objection reach to the desire position, I can check on every frame update if the navigation has finished but I want a…
Ilan12
  • 81
  • 2
  • 11
2
votes
1 answer

(Unity C#) NPC not moving on Grass and other terrain

I have created a NPC that follows the main player. When the player is in a certain range of the NPC, the NPC is supposed to walk, run, and attack based on the distance between the player and the NPC. The NPC has an Animator, box collider, Nav Mesh…
2
votes
1 answer

My player character on load saved position falls of box

You can see on youtube video, that my character falls down after load. And I want to know why? https://youtu.be/_CKNaYBxvhQ?t=1 When i save player position the loaded position is same. Fall happens after load position. here is whole project thx for…
vtchom3
  • 23
  • 4
2
votes
1 answer

Unity3d NavMeshAgent.isOnNavMesh becomes false in specific function

I've changed the Title to reflect the addition of clarifying info. I'm following a [Unity Tutorial][1] and when it came time to test the player click controls Unity gave me an error: "SetDestination" can only be called on an active agent that has…
R Kyle Butler
  • 23
  • 1
  • 5
2
votes
1 answer

Pathfinding to waypoints using NavMesh (Unity)

I want to make a simple script, that guides a NavMesh agent to various waypoints. I am new to Unity so I don't know some basic functions yet, which is instead typed in pseudo code. using UnityEngine; using UnityEngine.AI; public class…
Bassusour
  • 175
  • 6
  • 14
2
votes
2 answers

Unity3D how to connect NavMesh and NavMeshAgent

I'm getting this error in the editor "SetDestination" can only be called on an active agent that has been placed on a NavMesh. These are the steps that I tried when solving the problem: Warping NavmeshAgent to the NavMesh location Manually moving…
Luka Rolak
  • 43
  • 1
  • 7
2
votes
1 answer

Basic RTS movement using Navmesh & co-routine?

I'm trying to make characters to follow moving object by clicking on it (Basic RTS movement), and I've heard that using co-routine is saving more computing power than using void Update. However, I'm quite new to co-routine and I need some help.…
Irfx
  • 45
  • 1
  • 4
2
votes
1 answer

NavMesh baking finished very quickly and does not include some objects

I am doing one of Unity's official tutorials: Survival Shooter. Unity version: 5.3.4f1 Device: Macbook, OSX 10.11 http://unity3d.com/learn/tutorials/projects/survival-shooter/environment?playlist=17144 The problem: Baking process completes almost…
frankish
  • 6,738
  • 9
  • 49
  • 100
2
votes
1 answer

Share same Navmesh with Duplicated Scenes

I had a Scene with a map (some buildings and roads) and Baked Navmesh, then I started Duplicating the Same Scene with modifying some objects inside (not the map or the world), so all the Scenes were sharing the same Navmesh somehow, then I deleted…
MKH
  • 25
  • 3
2
votes
1 answer

How to make navigation meshes for pathfinding?

I understand how navigation meshes work but how do I actually create them. My guess was choosing random vertices with a given set of constraints like, constant z-axis value to make it plane, choose random points which are not less than the minimum…
user3124361
  • 471
  • 5
  • 21
2
votes
2 answers

Convert a mesh into a graph for navigation

Sidenote: I'm not sure if this question belongs on the game development stack exchange site - but, I feel it belongs here since, while the context is a game, the algorithm itself that I'm looking to implement is fairly application agnostic.…
LittlePip
  • 266
  • 3
  • 7
2
votes
1 answer

Navigational Meshes Pathfinding (in polygons)

I'm working on a Point and Click adventure game in JavaScript and I need help with the whole movement mechanic. From what I gathered about the subject there seem to be two main subjects- Navigational Meshes and A* Pathfinding Algorithm. However, for…
1
vote
0 answers

Unreal Engine Detour Crowd does not work with Nav Links with different heights?

I have two nav planes with different height, connected with one nav link (see picture below). I have several pawns with FloatingPawnMovementComponent. If I use AIController for all the pawns, they can “climb up” the nav link and reach the higher…
Valar Morghulis
  • 647
  • 5
  • 16
1
vote
0 answers

Dynamic Navigation Polygon Generation in Godot 4.0

I'm currently developing a game in Godot 4.0, and I've come across a challenge I'm unable to solve. In my game, the level design is dynamic and involves placing walls and other terrain pieces at runtime. I would like to have the navigation mesh…
Eris
  • 21
  • 3
1 2
3
14 15