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

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024

Комментарии • 81

  • @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.

  • @Sir_Isaac_Newton_FRS
    @Sir_Isaac_Newton_FRS 4 месяца назад +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 .

  • @andrewz8763
    @andrewz8763 13 дней назад +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!

  • @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

  • @Argenuto
    @Argenuto 5 месяцев назад +2

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

  • @INeatFreak
    @INeatFreak Год назад +6

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

  • @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 6 месяцев назад

      @@LlamAcademy Great, thanks!

  • @brandonjacksoon
    @brandonjacksoon 2 года назад +3

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

  • @BlueHat1
    @BlueHat1 2 года назад +3

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

  • @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...

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

    Awesome

  • @marcjukil300
    @marcjukil300 2 года назад +3

    Waou, this is very high quality content !

  • @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 ;)

  • @fabioxperuggia
    @fabioxperuggia 3 месяца назад

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

  •  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!

  • @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.

  • @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

  • @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?

  • @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!

  • @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?

  • @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!

  • @B4NTO
    @B4NTO Год назад +1

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

  • @cyco3oy
    @cyco3oy 2 года назад +2

    Awesome!

  • @experiFilm
    @experiFilm 2 года назад +2

    Omg this is the coolest video ever!!!

  • @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!

  • @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...

  • @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.

  • @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

  • @orc_spearman
    @orc_spearman 2 месяца назад

    thanks for this!

  • @alperaydin7011
    @alperaydin7011 2 года назад +2

    Thanks

  • @styliann
    @styliann 2 года назад +1

    This is excellent work.

  • @metal_burn
    @metal_burn 6 месяцев назад

    to 4to nado

  • @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 Год назад

    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!

  • @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 Год назад

    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

  • @Jarzykk
    @Jarzykk Год назад

    Thank you.

  • @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 5 месяцев назад

      Lol

  • @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

  • @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