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

Unity NavMeshSurface Loading Incorrectly

I am having trouble with the NavMeshSurface build process at runtime. I followed Unity's tutorial for using the NavMeshSurface features... https://unity3d.com/learn/tutorials/topics/navigation/making-it-dynamic?playlist=17105 ...and integrated it…
0
votes
1 answer

SetDestination shows a different value than the one being set

I'm trying to use the dynamic path-finding API of Unity to implement an indoor-navigation like feature in using a HoloLens. However, when I call the agent's setDestination method and observe the value of destination in the very next line, the value…
0
votes
0 answers

Clones don't respond to navmesh

I made a script so that the I could clone soldiers by pressing A and then that the soldier move where a click when they are selected. I've tested the script with not cloned soldiers and everything work. Unfortunatly the clones don't work, i suspect…
Bruck Film
  • 11
  • 2
0
votes
1 answer

Unity3D: Contrain movement to one axis at a time

I am making an isometric game in Unity. Im using a 3d cube as an agent for my 2d sprite. I have set up animations so that the sprite turn in the direction it is walking, however the cube is not walking in one axis at a time. Instead the cube moves…
slindten
  • 361
  • 3
  • 14
0
votes
1 answer

NavAgent tangent to the terrain

I have a NavMesh on the floor (with some hills and things) and my "soldiers stand" (I'm replicating a table top wargame) have NavMeshAgent. Everything works fine and smooth but the problem is that when agent goes uphill it stays vertical, which I…
javirs
  • 1,049
  • 26
  • 52
0
votes
1 answer

Transform Of GameObject getting changed incorrectly after updating RuntimeAnimatorController

In Unity, A gameObject has NavMeshAgent and Animator component. I am changing runTimeAnimatorController of Animator component in a function called 'changeAnimatorController' at run time in the following way: (language - C#) RuntimeAnimatorController…
Tejaswini
  • 351
  • 3
  • 10
0
votes
1 answer

Adding navmeshAgent causes game to freeze

I have a script which spawns enemies after a delay of time on a terrain that I have created. It works for the first three enemies created but when it adds the navmeshagent the fourth time it freezes the entire game. using UnityEngine; using…
Mindstormer
  • 299
  • 3
  • 16
0
votes
1 answer

How to make Player Model with Nav Mesh Agent to Jump

i have a program code on a Player model with Nav Mesh Agent that allows it to walk around the world when clicked but am trying to make it jump and haven't seem to achieve it. this is my code, don't know what to add or remove public class…
0
votes
1 answer

Only first NavMeshAgent can be placed

I am having an issue where only the first NavMeshAgent can be created. First of all, I selected all mesh renderers for the NavMesh bake objects: I fine-tuned the bake a bit so it had just the right amount of detail. The black gaps around the…
max pleaner
  • 26,189
  • 9
  • 66
  • 118
0
votes
1 answer

Check if disabled navmesh agent (player) is on navmesh

I am using the navmesh/agent on the player as an assistance autopathing function where the agent is disabled at all times unless the user clicks a point on the floor to walk towards. Then the agent will be disabled again once the destination is…
Mike H
  • 387
  • 9
  • 25
0
votes
2 answers

NavMesh Agent override rotation

I have enemies that patrol to different waypoints using NavMesh Agent I want when the enemy reach the next waypoint to have the same rotation as that waypoint. Here is the code: void Update () { if (agent.remainingDistance < 0.1) { …
Abdou023
  • 1,654
  • 2
  • 24
  • 45
0
votes
0 answers

NavMesh Sample position returns infinity

Im trying to get a random position that im sure is on the nav mesh. I use SamplePosition to give me the closes on mesh position on the nav mesh by calling another method that generates a random position that is sure within the screen field. I try…
Daarwin
  • 2,896
  • 7
  • 39
  • 69
0
votes
0 answers

Unity - NavMeshComponets not completely implemented in Unity 5.6

I have a question about the new NavMesh in Unity 5.6. I am not able to find any of the mentioned in the 5.6 release notes new Nav Mesh components (navMesh Surface, (Volume) Modifier). I do not really know how to easily get them. I have already…
Quinten
  • 23
  • 4
0
votes
2 answers

Unity NavMesh on a Sphere Unity 5.6 Navigation

with Unity 5.6 the NavMesh / Navigation has changed in some parts. My Question is: Is it now possible to create a NavMesh, that covers a whole sphere ? Thank you for your Answers!
user7752322
0
votes
1 answer

Cannot seem to create a NavMeshAgent variable

I am learning Unity on my own. I have started working on a game app I want to do. In this project I want to use the NavMeshAgent to make the "npc" locate items near it and go to grab them. I do see the component on the gameobject but when I'm…
aDeadPixel
  • 17
  • 4