Questions tagged [navmesh]

A navigation mesh is a data structure used by pathfinding algorithms to help AI agents move around complicated spaces. Navmeshes describe what part of level geometry agents are allowed to access (e.g. floors, platforms) while taking user-defined parameters and obstacles into account (floor steepness, step height, static objects).

Filter by
Sorted by
Tagged with
0 votes
1 answer
44 views

I'm trying to find a way to iterate through a list of game objects to find furthest object in the list. Then re iterate if path is blocked

I've got the first part of the code working. It iterates and does a check through the gameobjects to find the furthest nav point to hit. Then it calculates path to see if its valid or not. Now I'm ...
WestMansionHero's user avatar
0 votes
1 answer
45 views

What does this (Unity) NavMesh gizmo mean? (Reddish pixels in front of Agent)

Basically question. I've never seen this gizmo before. Though something I know is that my agent is failing at what's supposed to be doing. So, perhaps an error gizmo? But what kind of error?
YoshGJ's user avatar
  • 495
0 votes
1 answer
63 views

NavMesh Runtime Generation In Specific Areas

Unity allows the runtime generation of NavMesh surfaces with the Unity.AI.Navigation package through the BuildNavMesh method. However, this function re-bakes the entire NavMesh in the current scene, ...
Alec McKay's user avatar
1 vote
1 answer
136 views

Funnel algorithm : not possible with all convex polygons?

Disclaimer : yes, the whole map is not convex. But all of its subdivisions are ! (And that's what matters) Hi ! I got A* working with nav mesh. Now I need to find the tightest path along the mesh path....
DisturbedBerry's user avatar
1 vote
1 answer
110 views

Is it possible to change the default color of Godot's NavigationMesh3D in the editor?

I'm working on a game that uses a lot of high-intensity and pastel color language, and unfortunately, the navigation mesh is doing the same thing! There's a good bit of eye strain there. If I could ...
Michael Macha's user avatar
0 votes
1 answer
459 views

How to check if a point is on the navmesh?

How do I know if a node is in within a navigation rectangle? I am working on an enemy spawner that puts enemies off screen but I need to pick positions where the enemies will actually work (read: on a ...
idbrii's user avatar
  • 783
3 votes
1 answer
456 views

What's the correct way to use NavigationAgent3D in Godot?

I've just started using Godot and obviously fail to use NavigationAgent3D correctly. I've added a NavigationRegion and baked a ...
Paul K's user avatar
  • 151
1 vote
0 answers
163 views

Procedural NavigationPolygon for a platformer in Godot 4

I'm trying to make navigation possible for npcs in a 2D platformer. The game generates chunks with random platforms as the player ascends, so I also need to implement the navigation procedurally. Each ...
Alex CB's user avatar
  • 376
0 votes
2 answers
511 views

How to rotate NavMeshAgent toward its movement direction?

I'm working on a 2D game in XY plane. I've created enemies using NavMeshAgent and I've gave my agents way pints to move between them. The problem is that I don't know how to rotate them in the ...
A-Eye's user avatar
  • 3
1 vote
1 answer
555 views

Generate a fully 3D NavigationRegion/pathfinding in Godot 4

I'm making a spaceship game where the enemies and the player have the full 6 degrees of freedom, so can move forward/backwards, left/right, up/down and can also rotate in all three axes. I'm wanting ...
beyarkay's user avatar
  • 127
0 votes
0 answers
57 views

How to apply avoidance to path following with root motion?

My Character Blueprint uses Root Motion to control locomotion (taking location and turning it into a direction to move). However, root motion is not compatible with avoidance pathfinding such as ...
Candle's user avatar
  • 141
0 votes
0 answers
44 views

Scared enemies run into walls

I set up a basic pyramid shaped enemy kinematic body that runs away from the player when its health is too low and runs towards the player if the enemy has enough health. The enemy also turns to face ...
Cei's user avatar
  • 873
1 vote
1 answer
319 views

Rectangular shape NavMeshAgent for Unity?

I have an issue with the tank character. The Unity's navmesh agent only has a cylinder shape, so when the enemies are nearby, it causes unwanted results. If the navmesh is too big(to cover the entire ...
modernator's user avatar
  • 1,213
0 votes
1 answer
95 views

Mouse-Click Movement Using Unity NavMeshAgent Causes Stuttering Upon Reaching Destination

Alrighty, so I've seen a lot of stuttering-related questions about NavMeshAgents but my problem is a little specific to my use case since it has nothing to do with <...
NicCantCode's user avatar
1 vote
1 answer
857 views

How to deal with large number of Navmesh Agents?

I have more than 200 units in a single scene, all of them use Unity's NavmeshAgent to set their destinations to the main target. The problem I'm facing is that some ...
jasmine zhao's user avatar
0 votes
1 answer
181 views

Vertical components not working with NavMeshAgent .move or .velocity?

This is a weird one. I'm using a 2d adaptation of the NavMesh (found here: https://github.com/h8man/NavMeshPlus) to get obstacle avoidance for my AI in my 2d game. I also want to use it for my player ...
IronWaffleMan's user avatar
1 vote
0 answers
201 views

How to follow a moving target using Godot NavigationAgent2D?

I am currently creating an enemy which will follow the player. I was using the player GlobalPosition to calculate the direction of the enemy movement. I am now in the process of implementing obstacles ...
Zeruno's user avatar
  • 111
2 votes
1 answer
1k views

How to make a Unity navmesh agent keep distance from the target

I want my enemies to follow the player, stop at a certain distance and when enemy is within that distance he will walk away. ...
Foneet's user avatar
  • 31
0 votes
2 answers
167 views

Weighting navigation mesh nodes for A*

I'm trying to implement path finding for my game using a navigation mesh and A* search. While I believe I got this working correctly I'm having trouble getting desired results because I don't know how ...
user1566228's user avatar
1 vote
2 answers
1k views

How to stop NavMeshAgent resetting rotation

I'm prototyping a 2.5D style game. I have my sprites angled at a 33° angle on the x axis. I'm using the NavMeshAgent for basic navigation and pathfinding. I've set the Angular Speed to 0, to prevent ...
Adam Lobo's user avatar
  • 309
1 vote
1 answer
2k views

Creating a nav mesh

I'm coding a custom engine using Python and Pygame. It's a top down 2D isometric RTS and I wan't to implement pathfinding for my units. My research has lead me to using a Navigation mesh which seems ...
Zoler1337's user avatar
0 votes
1 answer
2k views

RuntimeNavMeshBuilder: Source mesh does not allow read access

My code generates a level by looping through a list of empty game objects and choosing a random object from another list of objects, then instantiating that object at the empty object's position. Then ...
Crystalline787's user avatar
1 vote
0 answers
256 views

Issues with Unity NavMesh Links During Runtime

I'm pretty new to gamedev, so please bear with me. So the end goal here is to have some platforms that spawn in, and the player has to stay on the platforms to stay alive, while an enemy roams the ...
Braeden Corr's user avatar
0 votes
1 answer
62 views

Navmesh agents trying to go to destroyed objects

I am still working on the RTS and have added a system that allows enemies to randomly wander. However, when multiple enemies fight one of my units, they will just clump up Afterwords instead of going ...
Crystalline787's user avatar
1 vote
1 answer
2k views

Check if point is within Unity NavMeshSurface walkable area

I am using the NavMeshSurface component in Unity to generate a navmesh of walkable areas in a procedurally generated level. I am working on some basic behavior to use with a NavMeshAgent. I want to ...
GaleRazorwind's user avatar
0 votes
1 answer
519 views

Player overshoots path using NavigationAgent2D and NavigationPolygonInstance in Godot 3.5

I'm trying to add a click to move feature in my game using the new NavigationAgent2D and NavigationPolygonInstance but sometimes when the player reaches the end of the navigation path or changes ...
Javier Villanueva's user avatar
1 vote
2 answers
109 views

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

General Description I want to build a tech demo about a game concept I am carrying around for quite some time now. A lot of influences from different sources shaped this, and I will try to hint on its ...
Confused Merlin's user avatar
2 votes
0 answers
343 views

What's the best strategy for incorporating jumps into a 3D AI navigation algorithm?

I'm trying to make a game centered around chase sequences in a 3D level with a high degree of verticality and movement options for the player. Basically think Breath of the Wild in an urban landscape ...
Austin Capobianco's user avatar
0 votes
0 answers
285 views

How can I pragmatically move a navmesh rigid body when changing scenes?

I have an object with both rigid body and NavMeshAgent attached Which I want to set to a new location on scene change, but there is something weird going on with it. If I just try to set the position ...
Michael's user avatar
  • 101
0 votes
1 answer
180 views

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

I've read a couple of articles on Navmesh+A* navigation. So, I'm trying to implement a pathfinding for an RTS type of game. However, it seems I don't understand how to calculate a distance for A* when ...
Dmitrii Naumov's user avatar
0 votes
0 answers
1k views

How can I force my Navmesh agent to only move four directions? (for 2D)

I'm making a 2D game in Unity. For 2D I am using the NavmeshSurface2D-plus master package available on github. My enemy object is chasing my main character nicely, it's ok. I set my main character to ...
gunza's user avatar
  • 13
0 votes
1 answer
666 views

How can I update the Navmesh path in 2D games?

There are destructible and indestructible objects on the map I created with Tilemap, and I create a walkable area (bake) for my enemy object using the information I found on the internet and the ...
gunza's user avatar
  • 13
1 vote
1 answer
318 views

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

I'm making generator for EQS and need to put points on navmeshes located on different heights, one above other. So, my idea is to make raycast vertically and find intersection points with navmeshes. ...
Robotex's user avatar
  • 251
1 vote
1 answer
824 views

Godot bake NavMesh not working

I have a layout similar to the official Godot NavMesh example program. It is: ...
TheWorldSpins's user avatar
0 votes
1 answer
258 views

desired velocity and the local space z axis

This question is related to my previous post here , but, even though I did get some insight, I didn't fully get it, and hence have another dilemma. Since the dead earth series is not publicly ...
BumbleBee's user avatar
0 votes
1 answer
492 views

confusion on desired velocity

In one of the videos of the dead earth game dev series , the author mentions of calculating a local desired velocity of a NavMeshAgent. My point of confusion was, ...
BumbleBee's user avatar
0 votes
1 answer
161 views

Check if a procedurally generated maze built out of cubes is solvable

I have created a procedural level generator in unity. However, occasionally the algorithm creates a level that is impossible to solve. Therefore, I tried to implement a navmesh agent to check if it is ...
Dpythonrobot's user avatar
1 vote
0 answers
69 views

Object does not follow path correctly

I am trying to have an object follow a path which basically is a square: the object moves to the next corner and pauses for some time. The movement is correct initially, however, after sometime it ...
Minoush82's user avatar
0 votes
0 answers
462 views

Is there built-in way to restrict a `NavMeshAgent` to a specific area on a`NavMesh`?

I have an object with a NavMeshAgent that wanders around. It gets a random waypoint, moves to it, then waits a little while and repeats this process. I would like ...
Hazel へいぜる's user avatar
0 votes
0 answers
2k views

Character controller versus nav mesh agent for wandering?

I'm starting to work on the AI for my game, and one character will need to wander around aimlessly until one of its other states are triggered. With that, and after plenty of searching, I found a ...
Hazel へいぜる's user avatar
0 votes
0 answers
504 views

how to create something similar to warcraft 3 local avoidance?

I want to write a script that can lead to something like https://gyazo.com/90d3a0ec82a41f53c831b00c403dc7df (to surround the enemy through local avoidance). i am using navmesh unity, to solve this ...
NerzOff's user avatar
0 votes
0 answers
1k views

Companion AI with NavMeshAgent causing jittery movement on the X-Axis

I'm trying to do a companion AI that follows around my player but with a certain distance. I first tried to self-program the movement behavior. but realized quickly that a ...
Junes's user avatar
  • 11
1 vote
1 answer
113 views

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

Why do solutions such as Recast voxelize a 3D scene before transforming it back into polygons? Would it not be possible to just determine intersections of meshes, check for slope angles and adjust ...
xcrypt's user avatar
  • 488
0 votes
0 answers
575 views

How to generate a navmesh from a set of 3D meshes from scratch

I've found a great article on how to build a constrained delaunay triangulation that can be used to create a simple navmesh from cutout geometry. However, this does not seem sufficient to generate a ...
xcrypt's user avatar
  • 488
0 votes
0 answers
1k views

How can I get a raycast to hit navmesh only?

In Unity, I'm trying to get the raycast to hit the navmesh only, but I cannot find an option to place navmesh on a specific layer. Is there a way to raycast to the navmesh itself?
Leo Blanchette's user avatar
0 votes
1 answer
327 views

Unity Nav mesh lading data each frame

Hey all I had a question, I was looking into my game's performance and noticed this in the profiler: Is there any way to optimize this such as pre-generating tiles so it doesn't have to do it each ...
Doug Ray's user avatar
  • 143
1 vote
0 answers
1k views

Going up and down stairs by Unity3d's NavMesh

*Purpose I want to create a navigation mesh that is optimized for going up and down stairs and stopping. *Question I'm making a nav mesh to make a character go up and down stairs. I'm making a nav ...
user3732298's user avatar
4 votes
0 answers
124 views

Navigating an AI that shouldn't take the shortest path but the scenic route instead (e.g. fish)

I'm working on a sidescrolling game with an underwater "fish-like" AI that has some goals (interacting at various locations) and things to avoid (player). Started of with a Navmesh and ...
Paprik's user avatar
  • 151
0 votes
1 answer
66 views

How to assign an index to different node clusters? (for pathfinding)

Hellow~ So for a bit of context: i'm currently working on a RTS (way above may league) which already has a level editor and a node grid which maps the terrain, i previously make a navigation system ...
Frame Matt's user avatar
0 votes
1 answer
1k views

Nav Mesh Agents are not moving along the mesh

I'm fairly new to unity.I've been playing with Nav Mesh Agents lately.I have encountered this problem twice.The first time I didn't bother redoing my project all over again.But now its bothering me ...
AfiJaabb's user avatar
  • 113