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
57 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 ...
user avatar
0 votes
0 answers
158 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 ...
user avatar
  • 13
0 votes
1 answer
63 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 ...
user avatar
  • 13
1 vote
1 answer
24 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. ...
user avatar
  • 231
0 votes
0 answers
20 views

NavMeshSurface shows as none in inspector when trying to select a NavMeshSurface as script variable

I am following this tutorial. The instructor sets up some NavMeshSurfaces to his object and then in a script he creates the following piece of code: ...
user avatar
0 votes
0 answers
32 views

I can't use a NavMesh system for my enemy object (for 2D game)

My enemy object is patrolling the area I have determined. He's chasing me if I enter his field. But sometimes it gets stuck on the wall and cannot move. For this, I tinkered with the "NavMesh&...
user avatar
  • 13
1 vote
1 answer
35 views

Godot bake NavMesh not working

I have a layout similar to the official Godot NavMesh example program. It is: ...
user avatar
0 votes
1 answer
50 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 ...
user avatar
0 votes
1 answer
68 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, ...
user avatar
0 votes
1 answer
70 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 ...
user avatar
1 vote
0 answers
40 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 ...
user avatar
0 votes
0 answers
52 views

Spots missing from terrain nav mesh after baking

I have a problem with Nav Mesh. When I bake it, the baked terrain is correct except for 2 spots which stay empty like there is something there but it isn't. I disabled every object and it is still ...
user avatar
0 votes
0 answers
54 views

Allow Player controlled by NavMeshAgent to walk

I have a Player that I control using the thumbstick (or z/w/s/d), and I would allow this player to have walk and run. Now, My current code is the following for the movement : ...
user avatar
  • 105
0 votes
0 answers
79 views

Can I move the player with NavMeshAgent only?

I am making a prototype of a 3rd Person Controller for a minigame with Gamepad or Keyboard/Mouse (not point and click). I setup a terrain and NavMesh for my AI, and would like to use that NavMesh ...
user avatar
  • 105
0 votes
0 answers
61 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 ...
user avatar
0 votes
0 answers
374 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 ...
user avatar
0 votes
0 answers
121 views

UE4 Blueprints - AI movement on moving platform/object (like a ship deck)

I want to have AI (enemies) on a boat that moves on a path around the level (an island). But the AI seems to have a problem navigating on the deck of the ship. They always end up on the far back of ...
user avatar
0 votes
0 answers
53 views

Navigation algorithm to find closest point with LOS to another agent

I am trying to design an algorithm to detect the closest point where an agent has line of sight to another specified agent in 3D space and to move towards that point. The use case would be a turn ...
user avatar
  • 564
0 votes
0 answers
20 views

Can't get player to walk to object using NavMeshAgent

How can I get my player to walk to an object using NavMeshAgent? I've tried multiple tutorials and tried things I've come across online, but none of them has solved ...
user avatar
0 votes
0 answers
138 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 ...
user avatar
0 votes
0 answers
262 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 ...
user avatar
  • 11
1 vote
1 answer
75 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 ...
user avatar
  • 448
0 votes
0 answers
96 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 ...
user avatar
  • 448
0 votes
0 answers
313 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?
user avatar
0 votes
1 answer
64 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 ...
user avatar
  • 137
1 vote
0 answers
438 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 ...
user avatar
4 votes
0 answers
105 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 ...
user avatar
  • 151
0 votes
1 answer
49 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 ...
user avatar
0 votes
1 answer
522 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 ...
user avatar
  • 113
-1 votes
2 answers
958 views

Check if NavMeshAgent can reach position with dynamic obstacles

I am currently checking if a position in the NavMesh is reachable. It is reachable without the NavMesh obstacles. But the moment I add it, NavMesh's CalculatePath() ...
user avatar
1 vote
0 answers
57 views

How to adjust a path to avoid collisions with moving obstacles inside a nav mesh?

I'm writing a script for a bot and I'm a little bit stuck. There's a game, there's a player (me) and I want to get from point A to point B. I can find the path via bot's API (it returns a ...
user avatar
0 votes
2 answers
102 views

Is collision detection with static environment necessary for npcs

I can't find any information on this topic. I'm wondering about the differences between the collision detection approach for player as opposed to npcs. Basically NPCs will move strictly along the ...
user avatar
2 votes
0 answers
76 views

Any good pathfinding algorithm for lots of different speed zones? NavMesh seems not work

I have a terrain map with lots of different areas: roads, grass, swamp, forest, mountains. Each has different speed for the player. The map is continuous 3D map, not grids. Given a start & end ...
user avatar
0 votes
0 answers
457 views

Implement navmesh for climbing cliffs and walls

I am trying to implement dynamic wall climbing similar to Conan exiles and Legend of Zelda: Breath of the Wild. My system as of now uses a raycast to get the direction of a geometry's normal, and I ...
user avatar
  • 21
1 vote
0 answers
195 views

NavMeshAgent.CalculatePath produces a PathInvalid result

Anyone know what can cause NavMeshAgent.CalculatePath to return false and give a path with PathInvalid status? I have two ...
user avatar
1 vote
1 answer
241 views

How does heavily constrained delaunay triangulation work?

In short: I'm trying to find an algorithm for performing a Delaunay triangulation of a heavily constrained polygon (for the purpose of pathfinding), with the understanding that most of the resulting ...
user avatar
  • 762
3 votes
1 answer
289 views

Navmesh awkward path generation with string pulling due to "inner" vertices

I've identified a problem and a possible solution related to navmesh-based pathfinding. Before diving in, I'll preface my post with some questions to keep in mind as you read: Is this a known problem ...
user avatar
  • 131
0 votes
1 answer
202 views

How to find a valid point if NavMeshObstacle is blocking path?

Is there any way to find the closest valid point to my target if a NavMeshObstacle is blocking my agent's path? This point can be any point along the red line in the image above.
user avatar
  • 33
0 votes
0 answers
123 views

Agent stuck with each other

As the title. I have stuck on this: When many agents have same destination, they will be stuck with each other. I want they find a new path as character in the picture a attached below How can i make ...
user avatar
0 votes
0 answers
94 views

Eliminate unwanted "hills" in navmesh over a flat floor

So in the image below you can see that my navmesh has these weird hills being formed in it. Any way to remove these? My AI gets stuck on them.
user avatar
0 votes
0 answers
234 views

Can I rely on a Navmesh for X/Z movement and manually place my agent on the Y axis?

I'm generating my terrain mesh around the player (along with collision mesh and Navmesh). It's tile based, when the player moved enough I generate necessary tiles render meshes, then collision meshes ...
user avatar
  • 143
2 votes
0 answers
393 views

Navigation Mesh, Chunks and Funnel Algorithm

I am building a little RTS-like game as a side project and I am currently working on pathfinding. My approach to pathfinding is heavily inspired by things I saw in the Starcraft II map editor, which ...
user avatar
  • 21
0 votes
0 answers
295 views

Unity - Moving X amount of units to destination, RTS style movement

I have a reached a point now where I can select X amount of units, and move them to where I click. My problem is, they all try to get to the same point. I use Unity's own Navmesh + agent. I set ...
user avatar
  • 1,863
0 votes
1 answer
532 views

NavMesh going in the ground

I'm trying to do a navmesh. Everything seems to work fine exept that my character in almost completely under the ground. The ground is a plane with a mesh collider. I have baked it and checked my ...
user avatar
0 votes
1 answer
1k views

How to move player along navmesh link's curve?

NavMesh Link creates a navigable link between two locations that use NavMeshes. This link can be from point to point or it can span a gap, in which case the Agent uses the nearest location along the ...
user avatar
0 votes
2 answers
2k views

How to make a car follow a path?

I have a 2D game and my goal is to make a car follow a path (the road in the picture) and rotate in the same time. I tried a plugin in the assets store but it didn't work well for me and i had ...
user avatar
-2 votes
1 answer
220 views

How can a NamMeshAgent be configured to always look towards its next path position, but never move there?

I'd like to have something like an on-screen panel that appears in the direction that you are supposed to go. The panel is a NamMeshAgent with a speed of 0. I was hoping something like this would ...
user avatar
  • 143
0 votes
1 answer
98 views

NavMesh - LoS and "Containing"

For a gameserver/backend, I have a navmesh for "walkable" areas in form of points/triangles. Now I want to check every gametick if the client is still in a legit place and if he shots/casts a spell, ...
user avatar
0 votes
2 answers
2k views

How to make specific paths in UE4?

I have a project where I have 1 character (playable) and 2 NPC's (AI). The NPC's are programmed to meet 2 target points. Below is an image to facilitate understanding: As you can see, this green ...
user avatar
0 votes
2 answers
3k views

The 'speed' value of the Nav Mesh Agent component does not seem to affect speed at all (Unity3D/C#)

The speed value of the Nav Mesh Agent component doesn't seem to have any effect whatsoever on the speed of my game object. Actually none of the motion values seem to have any effect. I've attached ...
user avatar