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

can't click bake button

I am trying to make a NavMesh in Unity. So when I look up any of the tutorials, they show / tell that you can simply make a plane for example navigation static, and then go to window -> AI -> navigation and click the bake button. However, both the…
0
votes
1 answer

Unity NavMeshAgent does not contain a defintion for setDestination

I'm trying to make a script for an AI in Unity but I get this error: error CS1061: 'NavMeshAgent' does not contain a definition for 'setDestination' and no accessible extension method 'setDestination' accepting a first argument of type…
0
votes
1 answer

Unity NavMeshAgent won't move unless the player gets to a certain location

I'm using NavmeshAgent to make the enemy chase the player. Below is my script public Transform goal; private NavMeshAgent agent; private bool playerInSightRange; private bool playerInAttackRange; private void Awake() { agent =…
Jerry
  • 21
  • 1
  • 6
0
votes
1 answer

Decreasing nav mesh boundary size

So I have this setup: As you can see there is enough room for the actor to go through the gap between the cubes, but the navmesh is not present there. Is there a way to make the navmesh to be generated a little closer to the objects so my actor can…
Solci
  • 296
  • 4
  • 14
0
votes
1 answer

NavmeshAgent car rotation match to slope

my project So that white little cube is destination of car agent. Its working perfect on flat but if there is a slope agent's rotation is not changing. How can I do that?
Pulse
  • 1
0
votes
1 answer

Navmesh agent cannot walk through some parts of his path

I have a cube, that defines the destination for navmesh agent. There are no problems when my character walks to his destination for the first time. But then i randomly change the position of my destination object, and the path my agent should go to…
anri
  • 1
0
votes
1 answer

Is it posible to make navMesh on an object while there's another navMesh in the scene?

before I start a question, please understand if my English is weird. Okay, so let's say you have a plane with navMesh baked on it. Is it posible to make another navMesh on an object? I want to make "object A" to move around the plane, and make…
0
votes
0 answers

Unity NavMesh.SamplePosition goes into infinite

I want to use NavMesh.SamplePosition to find a point on NavMesh in order to instantiate game object. The code works with no bug for several months. But the function will go into infinite and freeze the game and also editor recently. Unity Editor…
Jacky Hon
  • 151
  • 12
0
votes
1 answer

How can I stop my NavMesh from baking inside static game objects?

In my scene I have 2 cubes with navigation static checked in the inspector and the navmesh has been baked. https://i.stack.imgur.com/e9qXQ.png You can see in this screenshot how when I put the camera inside the top cube, the navmesh has been baked…
0
votes
1 answer

How to get NavMeshAgent Horizontal and Vertical Inputs?

I have a 2D freeform directional blend tree, have horizontal and Vertical float values inserted. I just want them to be updated automatically when my character moves, I'm not moving the character using keyboard or Mouse I'm merely setting…
Kermit
  • 17
  • 4
0
votes
0 answers

Enemy AI not working properly with NavMesh

I been trying to create an AI for the enemy to patrol between some points and, when spot player in a certain range, the enemy stop the patrol and follows the player. The thing is, if I only have the enemy to follow the player, works perfectly the…
fss25
  • 13
  • 4
0
votes
1 answer

NavMeshAgent nextPosition and destination change on enable

I've got a turn based game which switches between units being NavMeshAgents (when selected) and NavMeshObjects (when not selected) I'm just using NavMeshAgent to navigate the path which I then navigate manually so I have updatePosition &…
Ben S
  • 1
  • 1
0
votes
2 answers

Unity - How to jump using a NavMeshAgent and click to move logic

I am building a game where the player can be controlled using the mouse input, using a click to move logic via a navmesh agent. In order to let the player jump, I started using a CharacterController as well which should help managing the player. My…
bre_dev
  • 562
  • 3
  • 21
0
votes
2 answers

I set Obstacle Avoidance - Radius of NavMesh in Unity, and the unit refuse to move?

As this image show, when I set Obstacle Avoidance - Radius to 4.5 and lower, the unit will refuse to move (it means it can't find the path?), but if I set it 5.0 or higher, all will work well. I've set the radius before I bake the NavMesh, but it…
0
votes
1 answer

Unity: Nav Mesh Agent doesn't remain inside character

I'm seeing that the Nav Mesh Agent of my character doesn't stay "inside" the character. I noticed that in the Scene inspector and saw the outline of the Nav Mesh Agent moving from my character as if they're colliding with each other. I've found no…
Villager
  • 89
  • 2
  • 2
  • 9