playMaker

Author Topic: AI Pathfinding stopped working after Navmesh's 2nd Bake  (Read 2106 times)

Bipolar

  • Junior Playmaker
  • **
  • Posts: 68
AI Pathfinding stopped working after Navmesh's 2nd Bake
« on: May 22, 2021, 05:20:44 PM »
Hello.

It is since 3 days I'm losing my mind...
I reported this to Unity too.

That's weird indeed.

I'm making a boss fight, ok?
At a certain point, when I edited the map to try it in a new level design context, it stopped working.

After I modeled the map, I set new static meshes, so I needed to rebuild\bake the navmesh... the result is a failure: now the AI doesn't follow the player anymore, and I made just ONE bake.

Some help?

Prestonh

  • Playmaker Newbie
  • *
  • Posts: 44
Re: AI Pathfinding stopped working after Navmesh's 2nd Bake
« Reply #1 on: May 22, 2021, 07:41:07 PM »
Which bake did you use? The navigation window or the componet. 

Bipolar

  • Junior Playmaker
  • **
  • Posts: 68
Re: AI Pathfinding stopped working after Navmesh's 2nd Bake
« Reply #2 on: May 22, 2021, 07:52:28 PM »
Which bake did you use? The navigation window or the componet.

I'm using both. I baked the map by the navigation window, then I dropped the AI in the new scene.

The boss doesn't work on any new modeled instance, meanwhile, everything with the Navmesh agent does and works.

So the boss is the only instance that doesn't travel toward the player.

Mitch_Heisenberg

  • Playmaker Newbie
  • *
  • Posts: 6
Re: AI Pathfinding stopped working after Navmesh's 2nd Bake
« Reply #3 on: May 23, 2021, 05:06:31 AM »
does the boss have a navmesh agent attached?

Bipolar

  • Junior Playmaker
  • **
  • Posts: 68
Re: AI Pathfinding stopped working after Navmesh's 2nd Bake
« Reply #4 on: May 27, 2021, 03:51:55 AM »
Here some info I missed.

I'm using Unity's navmesh.
The boss has the NavMeshAgent like the other instances.
They are all tagged as Enemies.
There is just one type of agent for now: Humanoid.

With bake the navmesh I mean when you generate the navmesh by the Navigation window.
And the global variable player is equal to PlayerGO
and PlayerGO was assigned as g.object to follow with Set Gameobject as Agent destination.
__

The AI can travel toward the obstacles. I also tried to remove them from the room, but the AI doesn't want to move. The FSM is executed and acts properly, so its behavior is running, the problem is the ai agent doesn't move.
To make a test, I made a backup/copy... and in this one, I removed Playmaker and installed Bolt (without changing scene or any parameter in the gos).
With Bolt, the AI started again to follow me.

Mitch_Heisenberg

  • Playmaker Newbie
  • *
  • Posts: 6
Re: AI Pathfinding stopped working after Navmesh's 2nd Bake
« Reply #5 on: May 28, 2021, 05:26:54 AM »
Did you figure this out?