Most of my AI manage to get around the walls.
But sometimes some of them go straight to the wall and get stuck.
See this video:
I’m not sure what’s wrong here.
Any Idea?
Thank you so much!!
Most of my AI manage to get around the walls.
But sometimes some of them go straight to the wall and get stuck.
See this video:
I’m not sure what’s wrong here.
Any Idea?
Thank you so much!!
Hm, try debugging using [ ’ ] button.
Hi @Shunitzo
I think I don’t know how to use the apostrophe button it correctly…
I tried but it did nothing
Is it the same as debugging like this?
You can see some previous steps
-I think AI is doing this:
0-Repawn (after dying)
1-Detect an enemy and try to follow him
2-The AI gets stuck in the wall
3-The follow task fails
4-Then he tries to get a combat position but also fails because it is stuck in the wall
5-Then he tries to get a cover position (There are no more options and that’s why it doesn’t fail)
6-After being stuck for a while it manages to free himself from the wall
I think the problem is that it can’t get around the wall when he tries to follow the enemy.
Maybe some parameter is incorrectly configured?
In the navigation mesh or something like that?
Looks to me like they’re getting stuck between the edge of the navmesh and the wall. Try lowering the Agent Radius (either in the RecastNavMesh actor or in project settings) to reduce the gap.
Like this:
After that, you can press 0 on numpad to see what navmesh parts are used by AI.
The bad thing is, it just show parts of navmesh, not the path itself.
Use this to see actual path:
Hi @Shunitzo
Thank you for teaching this. It is very useful.
The apostrophe button still didn’t work but I managed to activate it in the Developer/AI Debug option.
It seems that the array of path points is empty when the AI gets stuck on the wall.
I will continue debugging to find the problem.
Thank you so much!!
Hi @Shunitzo
I think i found the problem… more o less…
For some reason if the decorators does not has the “Abort Self” option the task still executing.
I thought the default behavior of the decorator was to abort the task immediately.
But does not. Instead the AI continues to move without a defined path.
So, “Abort Self” option seem to solve the problem.
What do you think? Is it a right or wrong solution?
Thank you so much
On the videos you’ve posted, I see that the problem occurs after the respawn.
How are you handling death for your AI?
It’s a fake death… I don’t destroy the actor.
1-Rag doll
2-Teleport to Player Start
I did it this way because I thought it would be more efficient.
I think the problem is when you teleport AI, Move to fails. And as you didn’t set it to abort on fail, task will keep running.
So should I force abort the tasks when it dies?
Does that mean I was wrong about the decorators?
Ok, I’ll try it.
Thank you so much!!!
Yes, I think you are totally right.
And I was completely wrong.
It does works even without “abort self”.
Canceling all tasks while dead works.
Take a look at this
Thank you very much for your help
Very Very appreciated
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.