NavMeshAgent Avoidance in Depth - 5 Key Takeaways for Optimal Avoidance | AI Series Part 32

Поділитися
Вставка
  • Опубліковано 4 жов 2024

КОМЕНТАРІ • 81

  • @andrewz8763
    @andrewz8763 18 днів тому +1

    This video just solved a major hurdle for me with my nav! Thank you so much for doing the deep dive on it and providing the documentation links. I never would have found some of the settings if it wasn't for this video!

  • @ronigleydsonvilasnovas8067
    @ronigleydsonvilasnovas8067 2 роки тому +26

    I think it would take me years to learn so much valuable information about AI and unity, you've made it so much easier and fun. thanks for the new tutorial.

  • @INeatFreak
    @INeatFreak Рік тому +6

    This channel is a hidden gem. Hope you get the recognition you deserve.

  • @Argenuto
    @Argenuto 5 місяців тому +2

    Excelent... No words can describe the quality of this video. THANK YOU!!

  • @JoeCoo7
    @JoeCoo7 2 роки тому +2

    Imho the best video of your series. Thanks for making this. Much appreciated.

    • @LlamAcademy
      @LlamAcademy  2 роки тому

      That's powerful! Thank you I appreciate the feedback

  • @poobagification
    @poobagification 2 роки тому +6

    All those zombies trying to pass each other was very satisfying to see

    • @LlamAcademy
      @LlamAcademy  2 роки тому +1

      Some of the visualizations were pretty cool. I reran a lot of them multiple times just for fun

  • @BlueHat1
    @BlueHat1 2 роки тому +3

    Thank you so much! This is exactly what I was looking for.

  • @tufanaydin6340
    @tufanaydin6340 Рік тому +1

    I just discovered your channel. You make very nice videos. I can find everything I need specifically. You are amazing and very sincere.

  • @zsomborrozsa1086
    @zsomborrozsa1086 2 роки тому +2

    Thank you so much! This was the only thing that was bothering me! My player pushed the enemy before killing it, but now I could solve it. Good luck in the future!

  •  2 роки тому +3

    Very good video, loved the detailled options and visualisation, it made things so clear, thank you !

    • @LlamAcademy
      @LlamAcademy  2 роки тому +1

      Thanks! I'm really glad it helped!

  • @maxpanic3633
    @maxpanic3633 2 роки тому +2

    OH MY GOD WHY DOES IT HAVE LESS THAN 10K VIEWS, SOMEBODY EXPLAIN PLZ
    Great tutorial ! Thank you very much I think I will binge watch the whole serie right now, and you got a new subscriber ;)

  • @B4NTO
    @B4NTO Рік тому +1

    Will have a look at this tomorrow :D thanks for making this!

  • @brandonjacksoon
    @brandonjacksoon 2 роки тому +3

    Greetings from Reddit ;)
    Liked and subscribed!
    Thanks for interesting content!

  • @marcjukil300
    @marcjukil300 2 роки тому +3

    Waou, this is very high quality content !

  • @DmitryKhutornoy
    @DmitryKhutornoy 2 роки тому +3

    thank you so much! Your lessons are very helpful!

    • @LlamAcademy
      @LlamAcademy  2 роки тому +1

      You're welcome! I learned a lot on this one myself!

  • @impactsuit9871
    @impactsuit9871 Рік тому +1

    Great channel, by the way, helped me a lot, thanks!

  • @iamthebubb
    @iamthebubb Рік тому +1

    This is perfect. Now I don’t need to program all this!

    • @LlamAcademy
      @LlamAcademy  Рік тому

      The Navigation system is pretty powerful. Not perfect, but does cover a lot of use cases out of the box!

  • @styliann
    @styliann 2 роки тому +1

    This is excellent work.

  • @experiFilm
    @experiFilm 2 роки тому +2

    Omg this is the coolest video ever!!!

  • @cyco3oy
    @cyco3oy 2 роки тому +2

    Awesome!

  • @orc_spearman
    @orc_spearman 2 місяці тому

    thanks for this!

  • @alperaydin7011
    @alperaydin7011 2 роки тому +2

    Thanks

  • @СергеусТищенко
    @СергеусТищенко 6 місяців тому +1

    Awesome

  • @flurinjenal374
    @flurinjenal374 7 місяців тому +1

    Top video! How does obstacle avoidance impact performance (FPS) for each quality options?

    • @LlamAcademy
      @LlamAcademy  7 місяців тому +1

      On my machine the performance was not significantly different, but you can download the full project on github and deploy to your target device(s) and see how it is on your target hardware!

    • @flurinjenal374
      @flurinjenal374 7 місяців тому

      @@LlamAcademy Great, thanks!

  • @Jarzykk
    @Jarzykk Рік тому

    Thank you.

  • @farshatowalex
    @farshatowalex 5 місяців тому

    Why stopped agent with 30 priority is not avoided by agent with priority set to 40? The 40 agent is just not moving when it gets close to 30 agent...

  • @fabioxperuggia
    @fabioxperuggia 3 місяці тому

    You should have shown how the code works and how to call those agent variables.

  • @DetectiveRyku
    @DetectiveRyku 2 роки тому +2

    How is the performance on mobile?

    • @LlamAcademy
      @LlamAcademy  2 роки тому +1

      In my game I have over 100 active agents with avoidance on "low" and it runs very fast. I'm GPU bottlenecked all of the time.

    • @flurinjenal374
      @flurinjenal374 7 місяців тому

      @@LlamAcademy How is performance on mobile with higher avoidance types such as "good" or "high" quality?

  • @danil_zz
    @danil_zz 2 роки тому +1

    NavMeshSurface is the answer: we can setup more voxels for narrow places, and only for that place

    • @LlamAcademy
      @LlamAcademy  2 роки тому +1

      Yup! Towards the end that's touched upon

  • @nishadtardalkar8737
    @nishadtardalkar8737 2 роки тому +1

    Hey how did you get the data about the avoidance cells that turn white and red?
    Also the one where which 8 agents its currently avoiding ?
    I wasn't to find it in your github project.

    • @LlamAcademy
      @LlamAcademy  2 роки тому

      Great question! That's the built-in debug visualization. If you keep open the "Navigation" window (Window > AI > Navigation), ensure the NavMeshAgent component is not collapsed on the GameObject, and select the NavMeshAgent you should see those controls in the Scene View. There will also be some options at the bottom right of the Scene View to enable different aspects of the debug visualizations.

  • @impactsuit9871
    @impactsuit9871 Рік тому +1

    Problem I always have with Navmesh agents avoidance is that it simply does not work if an agent is stopped in front of other agent, they start pushing each other.
    To circunvent it I use the Agent/Obstacle swap method, but it makes everything so much more complicated...
    I tried AStar Pathfinding instead of Unity Navmesh, same problem...
    Is there any other way to make it work?
    I mean, if both agents are moving, RVO works ok, they avoid each other, specially if they are moving against each other, but if the agent in front stop, the one moving behind will simply push it out of its way, as if it suddenly became invisible.

    • @LlamAcademy
      @LlamAcademy  Рік тому

      Hmm... As long as the agents have the same priority they should also consider stopped agents. I have tried this many times successfully that agents route around a stopped agent as long as there are not more than 8 nearby to consider. Can you validate your configuration of the agents?

    • @impactsuit9871
      @impactsuit9871 Рік тому

      @@LlamAcademy I tried that for months, got really sick of seeing them pushing each other, then I used the obstacle trick...
      Even when the stopped agent had 0 as priority and the one moving 99,simply push each other...
      I tried it with different combinations too
      Tried the Astar pathfinding, the paid version, same results
      Once an agent is stopped, the others simply push it
      Por, perhaps they are pushed WHILE STOPPING, it could be just that, anyway doesn't work...

  • @todkahler2092
    @todkahler2092 7 місяців тому

    This doesn't work if you want your enemies (the nav agents) to just be different instances of the same prefab, as enabled is a extern variable. So when you disable one agent you end up disabling them all.

    • @LlamAcademy
      @LlamAcademy  7 місяців тому

      I’m not sure I’m following you. Can you elaborate?

  • @iamarugin
    @iamarugin 2 роки тому

    Could you please share the link to RVO2 website you mentioned?

    • @LlamAcademy
      @LlamAcademy  2 роки тому +1

      Absolutely! I've added it to the description as well:
      RVO Websites
      RVO2: gamma.cs.unc.edu/RVO2/
      RVO: gamma.cs.unc.edu/RVO/

    • @iamarugin
      @iamarugin 2 роки тому +1

      @@LlamAcademy THANKS!

  • @ChadGatling
    @ChadGatling Рік тому

    Are you using the included nav mesh, or the new nav mesh surface? I can't find the avoidance prediction time on nav mesh surface.

    • @LlamAcademy
      @LlamAcademy  Рік тому

      The vast majority of these configurations are on the NavMeshAgent. Only towards the end when I go over the advanced bake settings are we dealing with the NavMeshSurface component

    • @ChadGatling
      @ChadGatling Рік тому +1

      @@LlamAcademy oh I found it. It's just a static property on NavMesh.

    • @LlamAcademy
      @LlamAcademy  Рік тому

      I must not be fully awake. I missed the specific property you were asking about! 😅 I’m glad you found it!

  • @freecash3474
    @freecash3474 2 роки тому

    How would I use this system with custom movement system for navmesh? Is it possible?

    • @LlamAcademy
      @LlamAcademy  2 роки тому

      Hi! Yes you can do custom movement on the NavMesh. You can call SetDestination to calculate the path to a given location, or use NavMeshAgent.CalculatePath() to get a NavMeshPath that represents how to get from point A to point B. You can then write your own logic to walk around on the NavMesh with fully custom code, or using NavMeshAgent.Move().
      Depending on your use case, it may be better to use A* and something like RVO2 agent than to try to monkey with the NavMesh APIs and doing custom movement.

  • @ChadGatling
    @ChadGatling Рік тому

    I saw the other comment on this but I still can't see the obstacle avoidance visualizer. Is there something I am missing to get it to show?

    • @LlamAcademy
      @LlamAcademy  Рік тому

      You need the Navigation window open and to have the NavMeshAgent selected to have that show up

    • @ChadGatling
      @ChadGatling Рік тому

      @@LlamAcademy hmmm... I did that and it wasn't showing. It's not important I just wanted to see it.

    • @ChadGatling
      @ChadGatling Рік тому

      @@LlamAcademy Actually I'm not sure what I did but I did get the option to show up in the corner. Thanks

  • @DanyloSyrotynskyy
    @DanyloSyrotynskyy 7 місяців тому

    Hello! We have bugs with navmesh agents a lot colliding each other, how to fix it?

    • @LlamAcademy
      @LlamAcademy  7 місяців тому +2

      That's what this video addresses 🙂

    • @DanyloSyrotynskyy
      @DanyloSyrotynskyy 7 місяців тому

      @@LlamAcademy ahaha, sorry explanation was bad, that looks not like colliding but entering each other when target movement position for them all is the same
      NavMesh.avoidancePredictionTime = avoidancePredictionTime; // make it lesser and bugfixed a little

  • @metal_burn
    @metal_burn 7 місяців тому

    to 4to nado

  • @Sir_Isaac_Newton_FRS
    @Sir_Isaac_Newton_FRS 5 місяців тому +1

    Bro your AI tutorials are best but bro please stop doing this "You-Yes You" part it sounds too cringe I am literally having goosebumps right now out of this cringe .

  • @Norimtim
    @Norimtim 11 місяців тому +2

    I like your videos ,but please stop with this" I'm here to help you, yes you", I always hesitate to click on your vid because of this intro. It's so much cringe my brain stops working. Please 🙏🙏🙏

    • @LlamAcademy
      @LlamAcademy  11 місяців тому +1

      🤔 hmm that's my favorite part of every video

    • @stargazerch
      @stargazerch 6 місяців тому

      Lol

  • @kirosmatavastros
    @kirosmatavastros 2 роки тому

    In short - Unity NavMesh is shit. What's new?

    • @LlamAcademy
      @LlamAcademy  2 роки тому +3

      Sorry, that's not at all the takeaway from this video. Is there room for improvement? Sure. Is it terrible? Absolutely not.

  • @Shakor77
    @Shakor77 Рік тому

    Nowhere in this video does it say how you tweak these things. Avoidance time etc need to be explained how it is set in Unity instead of just theoretical how it works.

    • @LlamAcademy
      @LlamAcademy  Рік тому +1

      Hi 👋. Sorry you didn't find that to be clear. Since this is a little more advanced tutorial I assumed you already knew where the configurations were done. Here are the relevant documentation links, I will also update the description to include those:
      Most of the configurations are on the NavMeshAgent itself: docs.unity3d.com/Manual/class-NavMeshAgent.html
      The higher level configurations such as the pathfindingIterationsPerFrame can be set at the NavMesh class: docs.unity3d.com/ScriptReference/AI.NavMesh.html
      And towards the end when talking about the surface configurations, those are on the NavMeshSurface component: docs.unity3d.com/Packages/com.unity.ai.navigation@1.0/manual/NavMeshSurface.html