JohnnyRobert
New member
Hello,
I have two agents, one is chasing the other, the agent being chased will always end up raycasting outside any generated navmesh, causing it to get stuck in the corners if the map/level is enclosed between 4 walls. This happens no matter what pathfinding algorithm is being used and no matter what navmesh generator solution is being used, being it Unity's or A* Project. I think the issue is caused by the code inside the "Evade" and "Flee" tasks and I haven't tested the wander task that much yet but I do have a feeling that all the tasks in this pack have the exact same issue.
My setup is as simple as it can get: I have a terrain of 50x50 enclosed by 4 walls and by another wall at the top and I have two entities inside the room, with one entity chasing the other. What happens after a while is at some point when the chaser gets close to the agent being chased and they're near a corner the chaser raycasts outside the navmesh and of course tries running through the corner and gets stuck there in the corner and it doesn't throw another raycast once that happens.
I've tried everything from switching up the pathfinding algorithms to switching the navemesh itself, the graph type and played with the settings of the tasks and of the nave mesh agent, it's also pretty complicated to understand exactly what is causing this issue.
I am no coder but I've managed to modify the evade task a bit with some help and the raycasting issue disappeared, it's just that now the chased entity is running in a circle around the chaser after a while and I don't know how to fix that because again I am not a coder but if it wasn't the movement tasks themselves the root of the issue then modifying their code should've have no impact on fixing the issue with the raycasts.
I've tried everything from putting stuff on different layers to switching up the pathfinders and changing the settings in the nodes themselves; I think it's the way these tasks are choosing to generate the waypoints.
Please let me know what to do to fix this issue, I can also share my project.
I have two agents, one is chasing the other, the agent being chased will always end up raycasting outside any generated navmesh, causing it to get stuck in the corners if the map/level is enclosed between 4 walls. This happens no matter what pathfinding algorithm is being used and no matter what navmesh generator solution is being used, being it Unity's or A* Project. I think the issue is caused by the code inside the "Evade" and "Flee" tasks and I haven't tested the wander task that much yet but I do have a feeling that all the tasks in this pack have the exact same issue.
My setup is as simple as it can get: I have a terrain of 50x50 enclosed by 4 walls and by another wall at the top and I have two entities inside the room, with one entity chasing the other. What happens after a while is at some point when the chaser gets close to the agent being chased and they're near a corner the chaser raycasts outside the navmesh and of course tries running through the corner and gets stuck there in the corner and it doesn't throw another raycast once that happens.
I've tried everything from switching up the pathfinding algorithms to switching the navemesh itself, the graph type and played with the settings of the tasks and of the nave mesh agent, it's also pretty complicated to understand exactly what is causing this issue.
I am no coder but I've managed to modify the evade task a bit with some help and the raycasting issue disappeared, it's just that now the chased entity is running in a circle around the chaser after a while and I don't know how to fix that because again I am not a coder but if it wasn't the movement tasks themselves the root of the issue then modifying their code should've have no impact on fixing the issue with the raycasts.
I've tried everything from putting stuff on different layers to switching up the pathfinders and changing the settings in the nodes themselves; I think it's the way these tasks are choosing to generate the waypoints.
Please let me know what to do to fix this issue, I can also share my project.
Attachments
Last edited: