Curved NavMeshAgent Paths | AI Series Part 35 | Unity Tutorial

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

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

  • @LlamAcademy
    @LlamAcademy  2 года назад +4

    One question I expect may come up (because that's what I tried to do in the first place and it doesn't work ;)) but I didn't add a section in the video for:
    Q: Why not just create a NavMeshPath with the smoothed corners and do NavMeshAgent.SetPath(smoothedPath)
    A: You cannot modify the corners property of the NavMeshPath. The NavMeshPath must be calculated by the Navigation System itself. All properties are read only: docs.unity3d.com/ScriptReference/AI.NavMeshPath.html

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

    This is like the llama version of infinity war. The culmination of several other story threads being woven together into a single epic tapestry. Click to move, all these nav mesh videos, bezier curves all spun together to make this one. Nicely done.

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

    Awesome work. I didn't even think of wondering why we can't move in a curvy path :) thank you

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

    Your channel is really coming along nicely, some great topics too.

    • @LlamAcademy
      @LlamAcademy  2 года назад

      Thanks! I appreciate that

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

      @@LlamAcademy Been working on my channel too so I know how much work you have put in to this. Looks great. One question. Do you do all of the video graphics and animations yourself? if so what software do you use? it looks great and way better than what I have been doing with Vegas so far but my video editing skills lack a lot.

    • @LlamAcademy
      @LlamAcademy  2 года назад

      Yeah I do all the recording and editing myself. I was using HitFilm express up until 2 videos ago. Recently swapped to DaVinci Resolve because HitFilm would crash on my laptop so if I wasn't home it was a real pain to put the video together on time. Personally I find HitFilm easier to work with but that may just be because I'm still new to DaVinci.
      It just takes time and practice. I know you'll improve over time just like I have!

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

      @@LlamAcademy Awesome thanks for the info

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

    Thanks for everything I redid whole enemy system without your series

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

    this will look perfect on human enemies. Thanks for the video.

  • @castlecodersltd
    @castlecodersltd 6 месяцев назад +1

    Thanks for this and all you other videos. Very informative. In my game, CalculatePath always returns false for me and I'm using the all areas area mask. If I call Set Destination on my character object, with the same target position, it happily goes to that position. Any idea why CalculatePath fails?
    Update: I've worked out what the issue was. The NPC tries to calculate the path when the game starts. The player drops from a height, into the map, so when the game starts they're not on the player isn't on the Mesh so it can't do it. However SetDestination works so I'm guessing that finds the nearest point on the Mesh behind the scenes.
    Another thing I've found is that this code (which I appreciate you're teaching the principal behind it) is that it doesn't work if you have NavMeshLinks in the path.
    Keep up the great work 🙂

    • @LlamAcademy
      @LlamAcademy  6 месяцев назад +1

      Glad you figured it out and thank you for sharing the result!
      I’m a little surprised the NavMeshLink didn’t work. I’ll have to look into that. I thought calculate path considered the links 🤔

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

    That's good il add it to my project. Rly cool man :>

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

    Why not just use a catmull rom spline over bezier? I feel like they are better suited to creating a curve that passes through points without many artifacts unlike Bezier curves.

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

      Those are also a viable option! I haven’t covered them on the channel yet so it was easier to use a topic I could refer viewers back to and not convolute this video also explaining those.

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

    When moving the agent with NavMeshAgent.Move it doesn't seem to use avoidance anymore. It still confines the agent to the nav mesh though. Does anyone know a way to still use avoidance and a custom path?

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

      That is correct, using NaveMeshAgent.Move just moves the Agent along the NavMesh. If you want to consider avoidance with this, you would have to implement that yourself using something like the RVO or RVO2 algorithms (RVO is used by Agents by default, RVO2 is newer and nicer)

  • @Youshisu
    @Youshisu 2 года назад

    i struggle to find tutorial on navmeshes with different agent sizes. It always bakes navmesh to current settings, and both agents folllow same pathing :| big agent just clips through obstacles

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

      With the NavMesh components you bake multiple NavMeshes with multiple NavMeshSurfaces based on the different agent configurations. Check out the AI Series part 1 where I cover that! ruclips.net/video/aHFSDcEQuzQ/видео.html

  • @MkGyver-m8c
    @MkGyver-m8c 2 месяца назад

    Dont get it, what is the advantage of smoothing? i see no smoothing moves well too

  • @liltux5495
    @liltux5495 2 года назад

    when i try to add the "NavMeshSurface" script onto an asset, it gives me an error that says "Can't add component "NavMeshSurface" because script class cannot be found"

    • @LlamAcademy
      @LlamAcademy  2 года назад

      For all of the AI Series videos I’m using the Nav Mesh Components: docs.unity3d.com/Packages/com.unity.ai.navigation@1.0/manual/index.html
      Part 1 includes how to install it and the basics: ruclips.net/video/aHFSDcEQuzQ/видео.html

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

    Awesome

  • @Dippps
    @Dippps 2 года назад

    Very good material bit i think it will be too heavy on performance

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

      Thanks 🙏. Depending on how many agents you have, it can see it becoming expensive.

    • @Dippps
      @Dippps 2 года назад

      @@LlamAcademy when you run away from ai it need to update almost every frame thats problem :D