Unity NavMesh Tutorial - Basics

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

Комментарии • 1 тыс.

  • @lindseyscruggs8303
    @lindseyscruggs8303 2 года назад +112

    Man, I miss this guy. Out of all the unity tutorials I went through, this guy had the clearest explanations, was the most entertaining and, in general, his positive, supportive attitude bolstered my confidence with something I thought I would never be able to do. He is the best teacher anyone could ask for and an inspiration.

    • @lights6040
      @lights6040 Год назад +2

      me too fr

    • @amosf.2780
      @amosf.2780 Год назад +1

      so true.....

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

      He was the like the god of tutorials for Unity R.I.P Brackeys we will miss you

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

      @@Lost_inTime what?! he passed away? when?

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

      he didn't he gave up his youtube career@@bsythdd4754

  • @OdysseyHome-Gaming
    @OdysseyHome-Gaming 6 лет назад +528

    For those following the tutorial who are new to Unity3D. Adding the box collider to the ground object is an essential step.
    The tutorial makes it seem optional during explanation of what "Use geometry --> physics colliders" setting of the navemeshsurface component does (2:19), but it's latter required for the raycast to hit the floor. If you forget this step (like I initially did) you will only be able to move your player by clicking the player during play mode.

  • @TheCurious36
    @TheCurious36 5 лет назад +16

    thank you so much dude. Literally when im trying to make a game, I'm like, "Dang I need a way to make AI that can navigate the world" and bam, a navmesh tutorial pops in my recommended, you're a life saver man!

  • @ckay7816
    @ckay7816 4 года назад +853

    Im gonna put Brackeys in the credits of all the games i make

  • @youknowedo
    @youknowedo 6 лет назад +579

    wow
    Sponsored by Unity
    You’re doing Unity bro!

  • @Oli_Thompson
    @Oli_Thompson 6 лет назад +4

    Your videos are incredibly helpful! Been learning Unity for about a month now and wouldn't be close to where I am right now without your content. Thanks man!

  • @Hotseewt
    @Hotseewt 6 лет назад +659

    I swear u scare me. You always make tutorials when I need to learn something for my game...

  • @SilverHaze5X
    @SilverHaze5X 6 лет назад +2

    Holly molly.. just when i need it..
    No wonder your videos are now sponsored by Unity, you're doing a great job at teaching people how to use it well !

  • @matthewspencer6669
    @matthewspencer6669 6 лет назад +47

    Your simple scenes always look so beautiful. You should do a tutorial just on the post processing you use for a scene like this.

    • @lens3973
      @lens3973 4 года назад +3

      I know this is old BUT PLEASE DO THIS

  • @V0LAT1LE_
    @V0LAT1LE_ Год назад +5

    Legend has it that brackeys will return one day

  • @pirulainen991
    @pirulainen991 5 лет назад +5

    I have to say, thanks a bunch Brackeys for your effort to put together such informative tutorials! I have learned so much from you, getting a better and better game designer. So once again, a big thanks!

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

    Excellent tutorial on yet another great feature. I really appreciate how much Unity does, I gave building my own engine a go for about 8 months and it is a ton of work, finally caved into Unity and I'm glad. Now I really appreciate all these little things that the engine does.

    • @user-dm1pr2qn5c
      @user-dm1pr2qn5c 3 года назад +1

      about yyou building yyour own engine, thats fire. what inspired that?

  • @EritoKaio
    @EritoKaio 6 лет назад +7

    Brackeys, you're a life saver. Thank you so much for all these tutorials.

  • @nalig-fortnite4718
    @nalig-fortnite4718 6 лет назад +1

    I really like that you put alot of work in the scenes you make before you start the video. That's why you are my favorite youtuber that does tutorials! keep up the good work

  • @SAW10
    @SAW10 6 лет назад +6

    sponsored by unity? aweasome!

  • @danishsinha401
    @danishsinha401 6 лет назад +1

    I think he should really be making official Unity Tutorials I really find them boring and I love the way he explains everything. Crisp Clear with detail and good examples. @Brackeys Thanks Alot!

  • @itsnotbloodborne1237
    @itsnotbloodborne1237 5 лет назад +11

    Updates: Instead of Baking your NavMesh his way, Unity has now integrated it into to the main toolbar under "Window", AI > Navigation. From there, navigate to the Bake tab, press bake, and youre good!

  • @silentiumdingo
    @silentiumdingo 6 лет назад +1

    Im so glad I found your channel I was locked in a box not knowing where to move on to next till I watched some of your tutorial/walkthrough videos and now I know where to go and how to actually use unity I couldn’t hang on to most of the other instructors but I understood you perfectly and I thank you so much you’ve inspired me to keep making games and learning different coding languages. Again thank you

  • @lukaasg3476
    @lukaasg3476 6 лет назад +49

    Would you ever do a video to save any game? That would be terrific :)

    • @Mr.Adhesive
      @Mr.Adhesive 6 лет назад +1

      sulindvas for now, Google player prefrences... It's extremely easy to use. If you need help just reply and I will try my best to answer any questions you may have.

    • @stephansetup6238
      @stephansetup6238 6 лет назад +3

      I personally found this quite helpfull. This goes over Player Preferences as well as Serializing to Json. It helped me understanding the Pro's & Cons of either option
      ruclips.net/video/-fAqBNeEWjs/видео.html

  • @salvatorebutera7453
    @salvatorebutera7453 5 лет назад +1

    Three days struggling with this ...Brackeys always saves my life!

  • @hidemat5141
    @hidemat5141 4 года назад +10

    Also, don't forget to add a collider to your terrain, otherwise the Ray won't hit anything.

    • @igorklukin4126
      @igorklukin4126 4 года назад +1

      That's what missed! Thank you for the comment. I skipped that part, because it looked like Brackeys made a collider just to show that it also could be used in NavMesh Baking.

    • @metinyldran366
      @metinyldran366 3 года назад

      Thank you!

  • @Crashtopher
    @Crashtopher 6 лет назад +2

    Nice video as usual. Initially I did not add a box collider to the ground as he did because the NavMesh was using geometry rather than physics colliders to bake. However, it took me a minute to realize this breaks the raycast from the camera to the mouse position because the object needs a collider for the raycast to return true. Just a tip if your NavMeshAgent seems unresponsive to input.

    • @FredrikBusklein
      @FredrikBusklein 6 лет назад

      Thanks man, couldn't figure out why it didn't work, now I just feel dumb.

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

    remember to install AI navigation from package manager

  • @crownprincetaze
    @crownprincetaze 4 года назад

    Love your channel. Might need to update this video since NavMeshSurface no longer exists in Unity 2020. Keep up the awesome work!

  • @paspiregamer5114
    @paspiregamer5114 6 лет назад +11

    Very nice you get sponsored be unity 😉

  • @Thermacon
    @Thermacon 6 лет назад +1

    I was just wondering when you were goin to upload this last night. How funny! Great job ;)

  • @PiyPowKachou
    @PiyPowKachou 6 лет назад +44

    Cool! Could you make a more advanced tutorial on runtime nav-mesh generation, please? (I see now in the end of the video there are more advanced things. I hope runtime nav-mesh will be included (In repository I see runtime, GREAT! )). You and your team are awesome!

    • @installwastaken
      @installwastaken 6 лет назад +1

      He has a team?
      who are they?

    • @outviteslb8143
      @outviteslb8143 5 лет назад

      @@installwastaken allah w akhbar

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

      @@outviteslb8143 what the heck?
      please dont tell me it was your little bro

  • @thalesGog
    @thalesGog 6 лет назад

    You have the best channel for Unity Developers (Specially for beginners like me). Thank you so much!

  • @jackpeterson1909
    @jackpeterson1909 6 лет назад +738

    "Coding your own games is easier than you think." Anyone?

  • @medhavimonish41
    @medhavimonish41 4 года назад

    You are gone for 2 months and still helping us out

  • @nerdin8or
    @nerdin8or 6 лет назад +9

    I love your tutorials! Thank you so much! If you haven't done one before, could you do a tutorial on grid-based movement like in XCOM or Fire Emblem?

  • @terrybuchan7568
    @terrybuchan7568 6 лет назад

    Seriously the best Unity tutorials on RUclips! So easy to follow! Thank you

  • @cyanberry5603
    @cyanberry5603 2 года назад +7

    question: how do you access the navmeshsurface component? I can't find it anywhere

    • @brethogan3832
      @brethogan3832 2 года назад +5

      So they kind of changed where to find it. There is a simple version you kind under: window - AI - Navigation. To find the more advanced version Brackeys is using here, in the Navigation menu, there is an experimental package URL at the bottom of the window.

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

      @@brethogan3832 Thank you for that!

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

      navmeshsurface component doesn't exist anymore

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

      @@brethogan3832 omg thank you

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

      @@brethogan3832 Thanks

  • @HappyTimesWithHank
    @HappyTimesWithHank 5 лет назад

    bruh. This channel has the best videos for early beginners! Thanks too much!

  • @Denissheferf
    @Denissheferf 5 лет назад +71

    i dont have navmesh surface

    • @donhelfrich6910
      @donhelfrich6910 5 лет назад +28

      Hi Julia. You have to download the component from github.com/Unity-Technologies/NavMeshComponents and copy it to the Assets folder of your project.

    • @saltyegg4204
      @saltyegg4204 5 лет назад +5

      @@donhelfrich6910 thank you so much! i though i had to create one by myself you saved my times!

    • @jiakhan
      @jiakhan 5 лет назад +7

      The video is outdated

    • @jareevoldemort2373
      @jareevoldemort2373 5 лет назад +2

      @@jiakhan so? Has unity changed 🤔

    • @dmudda90
      @dmudda90 5 лет назад +1

      @@donhelfrich6910

  • @chetmcgovern9985
    @chetmcgovern9985 6 лет назад

    Few months late but fantastic stuff. Brackeys is the best.

  • @_luceoon
    @_luceoon 6 лет назад +20

    Why you have to import a NavMeshComponent when you have it already integrated? Is this a new System?

    • @crowbarska
      @crowbarska 6 лет назад +8

      MadAurion Yes this is a pack of work-in-progress updates to the basic navigation system. It's still in development which is why it's not part of the main Unity software.

    • @stoui6160
      @stoui6160 6 лет назад +5

      MadAurion It would be better if he did the tutorial with the naviagtion window to set the walkable area.

  • @equiaux
    @equiaux 4 года назад +1

    Started using unity 3 days ago and now i understand a lot

    • @equiaux
      @equiaux 4 года назад +1

      I see you want to argue a lot , seems like you had a bad day ,

    • @equiaux
      @equiaux 4 года назад +1

      Yeah ,

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

      Been two years now i can create Games

  • @ktsp2538
    @ktsp2538 6 лет назад +93

    There is no Nav Mesh Surface on mine

    • @VideosMarkin
      @VideosMarkin 6 лет назад +10

      0:47

    • @johnhunsberger9567
      @johnhunsberger9567 6 лет назад +12

      It's in the "Example project" link. #1. Download project from GitHub. #2. Navigate to Asset Folder. #3. Copy the NavMeshComponents folder into your Unity project.

    • @minnimangaming7684
      @minnimangaming7684 6 лет назад

      Thanks man

    • @Broski682
      @Broski682 6 лет назад +2

      Hi sorry to restart the convo but am i supposed to download all the files in the example project? I want to use it for my own project

    • @Broski682
      @Broski682 6 лет назад +2

      Ah nevermind, I found another way. Just went to agent types then object then i select things in the hierarchy and set them as walkable/nonwalkable/jump

  • @garethrhodes7830
    @garethrhodes7830 5 лет назад +1

    Brilliant Tutorial! I can't believe how easy this process is. Thank you. I think I'm going to have to subscribe because I always land up on your tutorials.

  • @GoronTico
    @GoronTico 6 лет назад +32

    - Makes his own scene for around 15 minutes -.
    Me: "Ok, i can keep going"
    Brackeys: "You can use the link on the description to get this example scene"
    Me: *c:*

  • @SeleDreams
    @SeleDreams 3 года назад

    i'm trying to generate a navmesh from a prefab but it seems like it doesn't want to bake because it can't deduce a scene from what it says

  • @danielcurry6228
    @danielcurry6228 6 лет назад +5

    Any chance to see a way or suggestions as to limiting the pathfinding to strict angles and straight lines, basically so it doesn't move diagonally and only straight?

    • @Wohodix
      @Wohodix 6 лет назад

      do some straight narrow path ? some kind of rail layout,

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

    This is an awesome NavMesh tutorial! 👍🤓🧡

  • @igorthelight
    @igorthelight 6 лет назад +16

    New insult unlocked:
    "I'l bake you like a navmesh!"
    :-)

  • @PEDRO4075
    @PEDRO4075 4 года назад

    your are the best teacher bro, seriously

  • @MrCody-vx9be
    @MrCody-vx9be 4 года назад +3

    How can I have a line which shows the way of the agent?

  • @AnxietyDuck
    @AnxietyDuck 6 лет назад

    Congrats on the Unity sponsorship

  • @Sebastian-jt2kq
    @Sebastian-jt2kq 6 лет назад +6

    How did you do these childish '2D' graphics for the game? Is there a component that you have to attach or something?

    • @RobotwithBrainz
      @RobotwithBrainz 6 лет назад +3

      If you want to make a simple map like in the tutorial you should just make a bunch of cubes and size them accordingly. Or you can download ProBuilder from the Asset Store for free, which can help you make simple maps easy

    • @noahjames9457
      @noahjames9457 6 лет назад +4

      Rocioiu Sebastian Go to camera and select orthographic view.

    • @noahjames9457
      @noahjames9457 6 лет назад +3

      Rocioiu Sebastian Trust me, I was you at one point.

    • @petter9078
      @petter9078 6 лет назад +1

      Slightly rounded edges? You sure he's not baking shadows?

  • @darealepicgamer438
    @darealepicgamer438 6 лет назад

    Unity basically gave away good money, because you explain it well enough for the watcher to get an amazing understanding of unity. Plus, you do tons of unity anyway. Hey, but you deserve the money for the sponsor.

  • @LostStylus
    @LostStylus 5 лет назад +6

    Nothing shows up when I try to add NavMeshSurface

    • @sollillevang5871
      @sollillevang5871 5 лет назад

      same

    • @imsKo
      @imsKo 5 лет назад +1

      @@sollillevang5871 It's now in the Navigation Tab next to Inspector.

  • @abhijitranjan4479
    @abhijitranjan4479 4 года назад

    Just wow. Thank You Brackeys for your awesome tutorials.

  • @HypeGamer-rv6ub
    @HypeGamer-rv6ub 6 лет назад +4

    How did you make the walls one object?

    • @swatisen8507
      @swatisen8507 6 лет назад

      He used ended to make the walls and used a cube to make the ground

    • @darusius
      @darusius 6 лет назад +3

      What do you mean by "ended"? I am stuck with the same problem.

  • @SamuraiWormGaming
    @SamuraiWormGaming 6 лет назад

    My Nav Mesh Surface is COMPLETELY different to the one in the video! And i used the link in the description too!

  • @mangoalias608
    @mangoalias608 6 лет назад +11

    how do you do realtime NavMesh? like if enemies are walking around or if the walls move

    • @sunkillersharkny
      @sunkillersharkny 6 лет назад +1

      OnlineShopping I think it's a beta feature

    • @arrowinaknee8510
      @arrowinaknee8510 6 лет назад +6

      OnlineShopping, as he said, we will see it in the next video

    • @mangoalias608
      @mangoalias608 6 лет назад

      Oh cool. I didn't hear that part. Good to know. :)

    • @crowbarska
      @crowbarska 6 лет назад +3

      OnlineShopping You can add a NavMeshObstacle component to have objects dynamically change the nav mesh.

    • @MatheusLB2009
      @MatheusLB2009 6 лет назад

      You can use unityengine.ai.navmesh.buildnavmesh(). But it gets though to update in realtime, more practical in turns

  • @yahia1355
    @yahia1355 5 лет назад

    this seemed like so hard , but with Brackeys ..it's easy ! thank you very very much dude you are so good at this !!!

  • @neelimgoswami6336
    @neelimgoswami6336 6 лет назад +4

    man, the nav mesh surface component is not coming. what should i do

    • @swatisen8507
      @swatisen8507 6 лет назад

      I also

    • @swatisen8507
      @swatisen8507 6 лет назад

      Does anybody have a suggestion on what to do

    • @swatisen8507
      @swatisen8507 6 лет назад +1

      To use the NavMesh Surface component, navigate to GameObject > AI > NavMesh Surface. This creates an empty GameObject with a NavMesh Surface component attached to it. A Scene can contain multiple NavMesh Surfaces. I got this from the unity scripting api

    • @Kal_El_Dorado
      @Kal_El_Dorado 6 лет назад +2

      AI is not showing up. Not under GameObject and not under Add Component.

    • @swatisen8507
      @swatisen8507 6 лет назад +4

      Go to git hub ,unity technologies and there you will find it

  • @LeNumberJ
    @LeNumberJ 6 лет назад

    sooo nice of unity to sponsor you

  • @ninobrouwers1818
    @ninobrouwers1818 5 лет назад +5

    For people who can't see thei Navmesh, turn on Gizmos. in 2019.3 (earlier maybe aswell) it is outomatically turned off

    • @nv7287
      @nv7287 4 года назад +1

      Aww thanks :) I was going nuts!

    • @Feather3
      @Feather3 4 года назад +1

      You just saved me hours of hardship and rage. THANK YOU.

    • @zaydvision4183
      @zaydvision4183 4 года назад

      Dude, thank you so much!

  • @TheToadSpinner
    @TheToadSpinner 6 лет назад +1

    I legit just started working on my enemies today! Good timing. :)

  • @serglit10229
    @serglit10229 4 года назад +12

    Why is the video called "English"??

    • @lavque
      @lavque 4 года назад

      ikr

    • @lavque
      @lavque 4 года назад

      @Peter Calabrese weird..

  • @chitrang7750
    @chitrang7750 6 лет назад

    AWESOME "Your Explanation for the lesson is Out of this world".
    :)

  • @ShimiShimiALD
    @ShimiShimiALD 6 лет назад +5

    Can you please do a city building game tutorial???

  • @lux2640
    @lux2640 6 лет назад +1

    You're such an amazing tutor, man.

  • @LUMINA3
    @LUMINA3 4 года назад +8

    why is the video called "english"

  • @user-ii1cn4ib9b
    @user-ii1cn4ib9b 6 лет назад

    I've been wating for this since I started following you . Thanks !

  • @greglyons288
    @greglyons288 6 лет назад +6

    "Orgre" ;-)

  • @itsttsi3858
    @itsttsi3858 4 года назад

    You seem very underwelmed that your sponsored by FREAKING UNITY!!!

  • @moreira3249
    @moreira3249 6 лет назад

    Congratulations on the unity sponsorship :D

  • @ShockWave2048
    @ShockWave2048 4 года назад +1

    This is great! Simple, fast, from scratch! Ideal tutor!

  • @MatrixQ
    @MatrixQ 4 года назад

    Ok, this is just amazing and opens up so many possibilities.

  • @GameOver7853
    @GameOver7853 6 лет назад

    You don't have to put the player in a separate layer to make the navmesh ignore it, you just need to add the navmesh agent component to the player :) good tutorial

  • @sumbuddy4088
    @sumbuddy4088 6 лет назад

    Sweet, this is what I was hoping for! This will be very useful

  • @gamedesignwithmichael
    @gamedesignwithmichael 6 лет назад

    Great video, keen for the next one.

  • @thegordoloco
    @thegordoloco 6 лет назад

    Awesome! A little bit closer to a Point and Click Adventure tutorial

  • @kelpdock8913
    @kelpdock8913 4 года назад +1

    it doesnt show anything or do anything when i bake does anyone know what ive done wrong lmao im only 1:35 seconds in
    but it does work, i just find it hard to adjust when there are no markings or anything like he has

  • @SirSnowman
    @SirSnowman 5 лет назад

    The NavMesh in 11 Minutes - You should be paid by Unity :) - Thank you so much!!!

  • @jummagamedeveloperbeginner6509
    @jummagamedeveloperbeginner6509 4 года назад

    Very very very thanks!!! I was trying to find a tutorial like this one, it really helped me a lot!

  • @frostmusicofficial
    @frostmusicofficial 6 лет назад

    I swear every time I need to know something for my game, you seem to upload that exact topic every time...

  • @Slayer4640
    @Slayer4640 6 лет назад

    i really like how you explained everything in detail in this tutorial😁

  • @smackjam6646
    @smackjam6646 6 лет назад

    I love all your tutorials. Request: Audio Tracker Modules

  • @ProjectV95
    @ProjectV95 6 лет назад +1

    JUST RELEASED WHEN I NEED IT!

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

    Thanks for your tutorial, it's comprehensive and incredible. Luv u.

  • @svetlinsvilenov8739
    @svetlinsvilenov8739 6 лет назад

    It's so nice when you hear a person that doesn't speak your language not butcher your name :)

  • @Hersatz
    @Hersatz 4 года назад

    If you are curious about the maths going on behind the scene search for:
    A* algorithm
    It is the algorithm for movement path finder and AI actions path finder.

  • @dharmeshkumar2763
    @dharmeshkumar2763 6 лет назад

    Superb explanation. Really helpful. Make your all upcoming videos like this. 😊

  • @abhay2166
    @abhay2166 4 года назад

    THANKS A LOT BROTHER .......YOU ARE THE BEST ......AND I LOVES YOUR VIDEO.....IM PROUD TO BE YOUR SUBSCRIBER

  • @michaelschepens3750
    @michaelschepens3750 6 лет назад +1

    Thank you so much for your videos. They are awesome and extremely informative.

  • @arjunmehta2853
    @arjunmehta2853 6 лет назад

    Wow this is amazing i needed this. Do more cool tutorials. I love this channel!

  • @braxtonsdev9564
    @braxtonsdev9564 6 лет назад

    We did this in the RPG Series, btw great video👌🏼

  • @ConcreteJungleGames
    @ConcreteJungleGames 4 года назад

    Thanks for the rich tutorial legacy my friend

  • @BeerfootBandit
    @BeerfootBandit 3 года назад

    We miss u brackeys

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

    Any recommendation for up to date tutorial? Many features used in this video are no longer avaliables

    • @aarondelgado3421
      @aarondelgado3421 4 года назад

      You can always look at the Unity documentation and make anything regarding the NavMesh components work.

  • @jonathansmith114
    @jonathansmith114 6 лет назад

    You are my coding savior.

  • @thatsjustfunny1
    @thatsjustfunny1 6 лет назад

    Hey man I love your stuff! Keep it up.

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

    I know we all love Brackeys but just remember that this is a very outdated tutorial. CodeMonkey has done a similar one on his channel and you no longer require packages and nonsense, it's much simpler now.

  • @alexanderlinderson2655
    @alexanderlinderson2655 6 лет назад

    Nice haha i just started a new project and was looking for videos about navmesh!

  • @jeffhan4119
    @jeffhan4119 6 лет назад

    This video is awesome!! Always thank you for your tutorial!!!

  • @PeterFurstenberg
    @PeterFurstenberg 6 лет назад

    Awesome tutorial! Thanks... Would love to see how to use the navmesh system in one-directional navigation, for instance, how to create a road network where the agent would always favour driving on the right-hand side of the road.

  • @kressckerl
    @kressckerl 6 лет назад +2

    Could you make one where you tell about navmesh costs and other stuff like that. I need to implement pathways, but cannot get it to work