Search Unity

AI and NavMeshObstacle

Discussion in 'Navigation' started by Aidy, Feb 23, 2015.

  1. Aidy


    Oct 15, 2014
    Hi there,

    I'm having trouble understanding what the issue with my game is. I haven't really used Unity's navmesh tools before, and the documentation that I've found so far has been useful, but I don't understand Nav Mesh Obstacles or how I can make them work the way I want them to.

    Can someone help by explaining how I would go about doing dynamic obstacle avoidance? I want my enemy to stop trying to pile on top of one another to attack me, I've got the navmesh set up with the agent and the NavMeshObject is attached to the enemy, however when I use carve it seems to do as it says on the tin - except it doesn't rebuild the navmesh thus makes other enemies stuck near and around their spawn point. It's a strange behaviour. I don't really know how to explain it, if you want I can update the post with some screenshots of what I mean.

    I'm trying my best to avoid using something like RAIN or A*, my Uni tutor wants me to use the Unity's navigation. It's more of a learning thing for me, even though chances are I'm just going to use RAIN in the future.