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).
180 questions
0
votes
1
answer
54
views
Navmesh Agent unable to cross doorway?
I am facing a strange issue where the navmesh agent is unable to cross a doorway. It used to work earlier but now suddenly it does not anymore. I am unable to find any possible colliders or objects ...
0
votes
0
answers
31
views
Unable to join NavMeshSurfaces for different floor areas
In Unity 6, I have a NavMeshSurface attached to a floor with other items as NavMeshObstacles and this seems fine.
The problem is,...
0
votes
1
answer
542
views
How to make an enemy able to walk on walls in Unreal Engine?
I'm working on my 1st title called Infernal,
and I'd like to make the enemy able to walk on both ground and walls.
For exemple: let's say the enemy is running towards the player and he gets shot. ...
0
votes
1
answer
78
views
path-finding question of 2d game server
I'm trying to create a game server. The game I want to create has a following feature.
2d (isometric view)
~300 users can play so a map will be not that small
all units can move in any angle (not ...
0
votes
1
answer
202
views
Setting up AI Pathing in Godot 4.3, NPC not moving but it is updating the pathing correctly
I am making a project in Godot 4.3 I am using a gridmap for the map and I have the NavMesh set up correctly, when I am in game I can get it to show me its pathing and it will update correctly ...
3
votes
3
answers
1k
views
Recreating StarCraft 2 pathfinding – no navmesh method seems fitting
As a hobby project I am trying to re-create pathfinding similar to StarCraft 2 based on the presentation from GDC 2011: https://www.gdcvault.com/play/1014514/AI-Navigation-It-s-Not
(Image source)
The ...
0
votes
1
answer
103
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 ...
0
votes
1
answer
193
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?
0
votes
1
answer
201
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, ...
1
vote
1
answer
303
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....
1
vote
1
answer
293
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 ...
0
votes
1
answer
3k
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 ...
3
votes
1
answer
3k
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 ...
1
vote
0
answers
372
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 ...
0
votes
2
answers
2k
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 ...
1
vote
1
answer
1k
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 ...
1
vote
1
answer
716
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 ...
0
votes
1
answer
159
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 <...
1
vote
1
answer
2k
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 ...
0
votes
1
answer
360
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 ...
1
vote
0
answers
351
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 ...
2
votes
1
answer
2k
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.
...
0
votes
2
answers
370
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 ...
1
vote
2
answers
2k
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 ...
2
votes
1
answer
5k
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 ...
0
votes
1
answer
5k
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 ...
1
vote
0
answers
442
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 ...
0
votes
1
answer
115
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 ...
1
vote
1
answer
3k
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 ...
0
votes
1
answer
847
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 ...
1
vote
2
answers
255
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 ...
2
votes
0
answers
487
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 ...
0
votes
0
answers
396
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 ...
0
votes
1
answer
235
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 ...
0
votes
0
answers
2k
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 ...
0
votes
1
answer
851
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 ...
1
vote
1
answer
514
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. ...
1
vote
1
answer
2k
views
Godot bake NavMesh not working
I have a layout similar to the official Godot NavMesh example program. It is:
...
0
votes
1
answer
351
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 ...
0
votes
1
answer
864
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, ...
0
votes
1
answer
220
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 ...
1
vote
0
answers
88
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 ...
0
votes
0
answers
668
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 ...
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 ...
0
votes
0
answers
606
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 ...
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 ...
1
vote
1
answer
241
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 ...
0
votes
0
answers
1k
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 ...
0
votes
0
answers
2k
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?
0
votes
1
answer
423
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 ...