I currently have a setup where my AI uses a behaviour tree to randomly wander around a Nav Mesh, great that works fine. It has also the function to move to towards the player once they’ve been spotted which also works… as long as the Nav Mesh is set to static in the project settings.
The moment I change it to dynamic the actor’s mesh starts “flickering”, for want of a better term, while it moves like it’s constantly trying to change direction. Now obviously the easy fix would be to set the Nav Mesh to static but I have physics objects which I want to interact with the mesh.
I have checked to make sure that every component in the actor has the “Can Ever Affect Navigation” UNchecked as well.
Okay, now I feel like an idiot after using the AI debugging tool… I’m going to leave this up though in case anyone else has the same issue:
The issue wasn’t with the AI’s mesh, it was components on the player’s mesh. Some of them still had the “Can Ever Affect Navigation” checked, causing the navmesh to flicker as it was updating, which in turn meant the AI was constantly updating itself.
So I unchecked all of them, and now it works fine!
Well, for me they are still flickering.
Unchecked every Can Ever Affect Navigation checkbox possible in the player’s BP and the enemy’s BP and still no change.
Any clues?
For anyone else coming here looking for solution,
the flickering is definitely from “Can Ever Affect Navigation”. You need to uncheck it on every child element of your pawn or whatever object the AI is trying to follow.