During the process of pathfinding, the AI sometimes stops frequently while moving.

Bai

New member
In the behavior tree, only "Discover Target" and "Seek" were set for the AI. During the movement, the AI's movement is sometimes constantly interrupted, resulting in very unsmooth movement or even incorrect movement. I have tried changing the behavior tree, the animation controller, and modifying its ability parameters, but I haven't found the cause of the problem. It is likely due to the character settings. This problem has been bothering me for several days, and I hope to get a new solution.
 
sorry,It has now been set to public. The main issue is that the Moving variable of the Animator keeps changing.
 
Hi, I noticed your npc is holding a weapon with a sphere collider, could you make sure that this item is using the Sub Character layer ? If this doesn't solve anything, could you try creating a new scene with just a plane and a new UCC npc and see if you're able to make the Seek task work there ?
 
Thank you very much for your reminder. I switched the scene and found that different effects occurred on different planes. There was lag when moving indoors, but not outdoors. I checked the colliders and layers of the navigation and the ground, and they were the same. I have no idea why this happened.
 
Knowing that the issue doesn't happen in an outdoor environment is a valuable piece of information. The next lead would be to try gradually raising the ceiling and see at which point the issue starts happening. Also, there's a Height Mesh setting in Unity's nav mesh system that would be worth taking a look at. I personally don't remember having ever messed with it, but you can start by enabling the related checkbox in the bottom left corner of the scene view. Lastly if you still can't figure out what's going on I can offer one screenshare for free to take a look at this, DM me if you're interested.
 
Thank you for your help. After I checked the box, there was indeed a significant improvement. However, some issues were caused by hitting the edge of NavMesh when turning.
 
Glad this led to some improvement, but I can't help with this other issue without more detail. Feel free to record another video, offer for a screenshare still stands too.
 
Back
Top