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

'Failed to create agent' error made even after building the NavMesh in real time - AR Foundation

I am creating a NavMesh in runtime so that I would be able to create a path for the enemy AI, the problem however is that while the NavMesh generation worked outside of AR (I made a script that would build the NavMesh with objects in the prefab).…
ITmaster
  • 29
  • 7
0
votes
1 answer

Unity NavMesh path reverse

I need to reverse this script used to make a game object to patrol between some transforms. I need the object to navigate sequentially from point (1, 2, 3, 4, 5) and when it reaches the end of the array it reverse the order of the array itself so…
user12014800
0
votes
1 answer

How can I check FindGameObjectsWithTag during runtime?

I'm having troubles with my enemy NavMeshAgent AI, First it searches for GameObjects tagged with "Defenses", then I set the first destination based in how close the defense is by my enemy, when the defense is destroyed, the array value is increased…
0
votes
1 answer

How to queue NavMeshAgents on entering a tile in Unity (based on path distance to tile)?

I'm making a game where multiple NavMeshAgents are trying to navigate to a specific ground tile. All agents should navigate to the edge of this tile, but only the first to reach the edge of the tile should enter it. The agent on the tile will stay…
Roger Wang
  • 565
  • 2
  • 12
  • 30
0
votes
1 answer

Baking Unity NavMeshSurface from NavMeshComponents on C# Generated Mesh

Problem: I'm having problems baking a C# generated mesh using the NavMeshSurface script provided in NavMeshComponents. If I bake the NavMeshSurface on the "WalkableMesh" GameObject the baking is over quickly and nothing is walkable. The…
Haskell McRavin
  • 620
  • 5
  • 19
0
votes
1 answer

How to check if a path exists to certain point on NavMesh for a NavMeshAgent in Unity?

I have a NavMeshAgent that I am using SetDestination() with, but the agent always tries to get as close to the destination as possible, even the location is unreachable.
Roger Wang
  • 565
  • 2
  • 12
  • 30
0
votes
0 answers

Unity C# transform.LookAt rotating on wrong axis

Im making the basic foundations of an RPG game. Its point and click, using a navmesh. I have set up the player to move to an enemy and attack when in range. The problem i am having is that when the player reaches the enemy (or the…
Neil
  • 1
  • 2
0
votes
0 answers

NavMesh surface does not work for all orientations

Unity has video tutorials about this where it claims to simply add NavMeshSurface component to an object and rotate the object to any orientation to get behaviors like walking on walls, etc. However, this does not work for all orientations. Here is…
0
votes
3 answers

How to move player from one mesh to another in the Navmesh

I am trying to get my player to teleport to a point in the mesh from a trigger that is activated in another mesh, more specifically in a ceiling. I tried this but it leaves me the player in a corner of the mesh where he is already. void…
olivia
  • 13
  • 4
0
votes
0 answers

Unity 3D NavMesh Agent when hit breaks

When I hit the enemy(which has the navMeshAgent) with my player the enemy is sent to the corner of the map and fidgets. It is sent in the direction that the player pushes it in. I just want it to go to the player for now. The code { GameObject…
0
votes
0 answers

Navmesh bake does not recognize floor at diagonal position

I made a 3D game with square floors which are completely fit into grid. Square floors are navigatable so when I bake navmesh, floors should be baked as navigatable path. However, navmesh works only under certain condition,…
jasson31
  • 59
  • 3
0
votes
3 answers

Unity c# - unable to Spawn Prefabs on a NavMesh

I am trying to make a zombie wave game and current have a Prefab for my enemies. If I have the prefab be in the scene when I hit run, they are attached to the NavMesh and track the player perfectly. I want to achieve this but with the enemy being…
Jack Godfrey
  • 23
  • 1
  • 4
0
votes
0 answers

Why am i getting a NullReferenceException in my PlayerController Script

Im following Brackeys video on NavMesh movement, and i got this error right at the very end. I cant work out why, the only thing i have that is not initialized is Vector3.zero, but Brackeys does it in his video and it works fine. The error i get is…
0
votes
0 answers

Unity: NavMesh Agent custom movement instead of basic transform position

I want my navMesh agent to perform a custom action , such as jumping, towards the target. I checked some tutorials and everybody does .setDestination and the agent moves towards it , what I would like is to add my own custom movement for agent to…
rokudoz
  • 1
  • 1
0
votes
1 answer

Navigating Avatar Around Game Map Issues: Avatar Hidden Inside Tiles & Click Animation

I am currently working on a tower defense game in Unity (2018.4). I am very new to this software and C#. Right now I have an avatar that moves around my game screen via a NavMesh plane. The orange box in my pic below shows where the transparent…
PineNuts0
  • 4,740
  • 21
  • 67
  • 112