Search Unity

NavAgents avoiding each other and using root motion aniamtion

Discussion in 'Navigation' started by astanid, May 7, 2021.

  1. astanid

    astanid

    Joined:
    Apr 5, 2021
    Posts:
    145
    I want to create a crowd of randomly walking people.
    Navagent with speed=0.8-1, angularspeed=120, obstacle radius =0.2 works almost fine
    i.e navagents are avoiding each other successfully. But animation doesn't look good - characters are sliding (like michel jackson :D) . it's not possible to adjust the speed to make it look right :(
    I can lower speed to 0.05-0.1 and apply root motion. Animations wil be ok, but navagents can't avoid each other.
    There're some scripts with the same idea :
    https://answers.unity.com/questions/839343/navmeshagent-using-root-motion-for-move-speed.html
    but the problem is the same - with all those tricks animations will not be good. Is there any way to apply root motion correctly ?