Search Unity

NavMesh vs Movement Controller for Enemy movement

Discussion in 'Navigation' started by Bees-MD, Oct 4, 2019.

  1. Bees-MD

    Bees-MD

    Joined:
    Sep 11, 2019
    Posts:
    2
    Should I use a NavMeshAgent or the player movement controller for my enemy movement?

    So I'm new to unity and I bought a controller for an easier entry/faster build. Now its not about the controller itself but it does all the basics for the player and for any moving sprite as far as i can tell. I've re-coded it to work for a enemy and right now it basically just tracks the NavMeshAgent around its path. I'm trying out NavMesh and learning that it seems easier to just use NavMesh but before I commit too much time one way or another I thought I'd ask. Would it be better to just commit the time to a modified player controller or just learn NavMesh better? or both?

    I wont show the code because its not mine.

    If interested I'm using "Character Movement Fundamentals" for the player the guy who made it is 10/10. The code is well commented and I've easily modified it for a double jump.
     
  2. Yandalf

    Yandalf

    Joined:
    Feb 11, 2014
    Posts:
    491
    What's insufficient about having the Controller follow the agent's path? It seems like a good solution to me if you're happy with the controller as is and just want to include pathfinding?
     
  3. Bees-MD

    Bees-MD

    Joined:
    Sep 11, 2019
    Posts:
    2
    I forgot to put in the post that this is for s 3rd person spyro like game.

    I guess I'm trying to see if there is a benefit to using the Controller+Agent path combo. Im currently fumbling through getting it to work but i haven't seen a post about someone trying the both an pointing out the pro/cons.

    It seems to me for low movement NPC's (animals, weak slow enemies) a plain navmesh would be the best. where a NPC that jumps or dodges a controller/agent mix would be better.