So when my enemy follows my character and goes around corners it gets stuck on the collider of the wall. When I try to fix this by increasing the walk able radius it works perfectly but when my character goes against a wall into the area where the mesh isn’t generated( I see this when I look at the visualization) the enemy loses the target and the move behavior in the behavior tree goes red. Is there any way to fix this? All suggestions welcome. I was thinking of generating the mesh and then increasing the colliders without regenerating so the player couldn’t go into the ungenerated area. But this would be pointless as the enemy would get stuck on the increased colliders again.
- RAIN will still calculate a path to the enemy, so it shouldn’t be losing the target. The default behavior is to move to the closest spot on the navmesh when the target is off the mesh. In this case, the Move node will fail when it reaches the nearest spot to let you know it is done moving, but can’t actually reach the target.
- If you want the AI to leave the navmesh, there’s a checkbox on your RAIN motor for “Allow Off Graph Movement”. Turn that on and you will be able to follow off the navmesh. In this case, Move won’t fail.