NEW AI Navigation - Unity 2023

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024
  • Discover the power of Unity's new AI Navigation system in this in-depth tutorial. Join me as I walk you through a hands-on demo, breaking down each component of Unity's AI Navigation system, and explaining how they seamlessly function together. Whether you're a seasoned developer or just starting out, this guide is tailored to help you understand and implement Unity's AI Navigation in your own game development projects. Dive into the world of pathfinding, AI-driven characters, and sophisticated navigation meshes. Don't miss out on unlocking the potential of Unity's latest navigation tools. Ideal for game developers, Unity enthusiasts, and anyone eager to enhance their skillset with AI-powered navigation.
    AI Controller Script:
    github.com/Ree...
    0:39 Import Unity AI Navigation Package
    1:23 Add a NavMesh Surface
    4:37 Modify layers
    6:02 Setup NavMesh Agent
    11:28 Add NavMesh Obstacle
    14:02 Build a height-restricting pathway
    14:46 Setup new NavMesh Agent type
    15:43 Setup 2nd NavMesh Surface
    17:45 Using NavMesh Modifiers

ความคิดเห็น • 53

  • @zagstrug9053
    @zagstrug9053 9 หลายเดือนก่อน +6

    Thanks for mentioning the Unity version & package you're using! That's a really important step in my opinion which many tutorials just skip

    • @FAR-Gaming
      @FAR-Gaming  9 หลายเดือนก่อน

      Appreciate the feedback! 🙂

  • @FreeHelm
    @FreeHelm ปีที่แล้ว +6

    This was really clear and informative, thanks!

    • @FAR-Gaming
      @FAR-Gaming  ปีที่แล้ว +2

      Glad it was helpful!

  • @Leito4Gaming
    @Leito4Gaming 3 หลายเดือนก่อน +1

    Excelent video tutorial! Thank you very much!

  • @Sylfa
    @Sylfa ปีที่แล้ว +4

    Just a tip, you don't need to put the characters on their own layer, anything that is a NavMeshAgent is excluded from the NavMeshSurface. It's essentially assumed that any agent would not count as an obstacle, if you wanted them to be one you would have to add the NavMeshObstacle to them.

    • @FAR-Gaming
      @FAR-Gaming  ปีที่แล้ว +2

      I tested this out and you're right! Thanks for the tip!

    • @Sylfa
      @Sylfa ปีที่แล้ว +1

      @@FAR-Gaming You're welcome! It seems early videos from unity about the navigation system mentioned this feature, but it never made it into the manual. So anyone who tries to learn it *now* would have to guess it works like that or look at the oldest videos that are partially outdated now.

  • @androvictrayo-dy7eh
    @androvictrayo-dy7eh ปีที่แล้ว +1

    wow, this is a good tutorial , it is really basic and easier to understand

    • @FAR-Gaming
      @FAR-Gaming  ปีที่แล้ว

      Thanks, glad you liked it!

  • @archmagesalamar1377
    @archmagesalamar1377 ปีที่แล้ว

    Great tutorial. Looking forward to more about AI navigation.

    • @FAR-Gaming
      @FAR-Gaming  ปีที่แล้ว

      Thank you! Any suggestions on something you'd like to see more about?

  • @jorgeelskizo2017
    @jorgeelskizo2017 ปีที่แล้ว +1

    really nice tuturial. Could you create a tutorial while using ai navigation, the ai follows the path to the player and hits if is close enough? ranged or melee

    • @FAR-Gaming
      @FAR-Gaming  ปีที่แล้ว +1

      Great suggestion! I'll start working on this!

    • @FAR-Gaming
      @FAR-Gaming  ปีที่แล้ว +1

      Tutorial for getting the AI to follow the player will be live first thing in the morning. AI attacking the player will hopefully be up within a couple weeks. Thanks again for the suggestions!

    • @jorgeelskizo2017
      @jorgeelskizo2017 ปีที่แล้ว

      @@FAR-Gaming Thanks!

  • @jihadrouani5525
    @jihadrouani5525 ปีที่แล้ว +2

    I was used to the old navigation system this one seem more powerful and allows for a higher level of control, although I wonder if the pathfinding itself or the performance of this new system is improved over the old one...

    • @FAR-Gaming
      @FAR-Gaming  ปีที่แล้ว +1

      I agree. I assume the pathfinding still works about the same performance wise, but them making this a package of its own instead of including it natively in unity will really allow for updates/improvements without having to push a whole new Unity version.

    • @studioshitaketakashita7093
      @studioshitaketakashita7093 ปีที่แล้ว

      @@FAR-Gaming assigning nav static suck'd azz lol

  • @citycritteradventures7427
    @citycritteradventures7427 8 หลายเดือนก่อน

    Great job. V clear, informative and gives a great base to get started with the nav package. Keep up the great work

    • @FAR-Gaming
      @FAR-Gaming  8 หลายเดือนก่อน +1

      Thank you!

  • @studioshitaketakashita7093
    @studioshitaketakashita7093 ปีที่แล้ว

    Please more Unity tuts big up!

  • @juleswombat5309
    @juleswombat5309 9 หลายเดือนก่อน

    Thanks I got confused on the new Nav Mesh package. This helps. But annoyed at the additional UI clutter to the scene/game views.

    • @FAR-Gaming
      @FAR-Gaming  9 หลายเดือนก่อน

      A lot of that you can turn off in either the gizmos menu or with the little navmesh box that appears in the corner. Hope this helps! 🙂

  • @CapnSudz
    @CapnSudz หลายเดือนก่อน

    How do I rebake a navmesh at runtime with this new system? I need to 'snap' pieces of world together procedurally at runtime and then bake the mesh. Help

  • @dirivial_
    @dirivial_ ปีที่แล้ว

    This was really helpful, thank you for making it!
    Question: Would it be possible to have a priority on certain areas? Imagine smooth rock vs rubble, where the smooth rock would be preferred and could for example grant extra movement speed to the agent traversing it?
    I just started making an RTS-ish game where this mechanic is a pretty important aspect.

    • @dirivial_
      @dirivial_ ปีที่แล้ว

      Okay I just read the documentation and yes, this seems possible.

    • @FAR-Gaming
      @FAR-Gaming  ปีที่แล้ว +2

      Yup! On the NavMesh Surface component where it says "Default Area" and it's set to Walkable, click the drop down and select "Open Area Settings". In there you can make multiple surface types and set their "cost". So you could make rubble have a cost of 5 and smooth rock be 1. And then the AI will only cross the rubble if 1) That's it's only choice OR 2) if the cost of going over the rubble is still cheaper than taking the long way around. Here's a video that explains cost really well. I hope this helps!
      th-cam.com/video/B3o_9JS6fOc/w-d-xo.html

    • @dirivial_
      @dirivial_ ปีที่แล้ว

      ​@@FAR-Gaming Thank you! 😀

  • @evancheng9393
    @evancheng9393 8 หลายเดือนก่อน

    thank you sir

  • @athithyaparamesh8251
    @athithyaparamesh8251 ปีที่แล้ว

    Thank you!

  • @UrbestM8
    @UrbestM8 9 หลายเดือนก่อน

    W tutorial 👍

  • @sukandakiangkai
    @sukandakiangkai 10 หลายเดือนก่อน

    Thank u 🥰🥰🥰

    • @FAR-Gaming
      @FAR-Gaming  10 หลายเดือนก่อน

      You’re welcome!

  • @NakedApeGaming
    @NakedApeGaming ปีที่แล้ว

    This was great! Just what I needed. Thanks!

  • @user-ht8bd7ro1i
    @user-ht8bd7ro1i 3 หลายเดือนก่อน

    hi can you help me about the AI Navigation

    • @FAR-Gaming
      @FAR-Gaming  3 หลายเดือนก่อน

      What’s up?

  • @mohsinanwaar5603
    @mohsinanwaar5603 7 หลายเดือนก่อน

    Can anyone help me that when I bake my NavMesh My Player colliding isn't wqorking properly can anyone please help me ???

    • @FAR-Gaming
      @FAR-Gaming  7 หลายเดือนก่อน

      Would love to help but I’d need more info. Another option is posting your issue on one of the Unity reddit pages.

  • @mohokhachai
    @mohokhachai 11 หลายเดือนก่อน

    When the new version released

    • @FAR-Gaming
      @FAR-Gaming  11 หลายเดือนก่อน

      The Unity AI Navigation package has been in the works for a while, but as of Unity Version 2022.2 the NavMesh components are no longer included by default and the AI Navigation package must be imported to your project separately.

  • @eyebegclip2890
    @eyebegclip2890 ปีที่แล้ว

    i dont found Ai Navigation. Help me plss

    • @FAR-Gaming
      @FAR-Gaming  ปีที่แล้ว

      Are you trying to find the package to add it to your project? Go up to Window > Package Manager and type in AI Nav and should be the package that comes up. Make sure in the top left your searching through all the packages and not just the ones in your project.

  • @moddyp4989
    @moddyp4989 11 หลายเดือนก่อน

    when i click on window and ai it shows navigation and navigation obsolete but when i click navigation it only shows agent and areas and the obsolete one shows agent areas bake and object pls help

    • @FAR-Gaming
      @FAR-Gaming  11 หลายเดือนก่อน

      What are you needing help with? A lot of the options that used to be in a separate window (Window -> AI -> Navigation) are now built into the components that you attach to GameObjects. So the baking option is part of the NavMesh Surface Component you can add to your ground or navigable surfaces. And you can manage your AI Agent Types from the dropdown at the top of the NavMesh Agent component that you attach to a character. It'll give you an option to open Agent Settings. I hope this helps! Let me know if there's something else you'd like help with!

    • @moddyp4989
      @moddyp4989 11 หลายเดือนก่อน

      I need help fixing the tool because when i try to bake it it says that it bakes but when its done it does not show me@@FAR-Gaming

    • @FAR-Gaming
      @FAR-Gaming  11 หลายเดือนก่อน

      In the bottom right corner of your scene editor, is the box checked for it to show you navmeshs?

    • @moddyp4989
      @moddyp4989 11 หลายเดือนก่อน

      yes but when i click bake it does not work when i click window, ai and navigations it pops up without bake and object but the obsolete one shows them but does not show the navmesh when i bake it@@FAR-Gaming

    • @FAR-Gaming
      @FAR-Gaming  11 หลายเดือนก่อน

      Don't bake it from there. Add a NavMesh Surface component to your ground. At the bottom of that component with be a button to bake. Use that button instead.