✅ Get the FULL course here at 80% OFF!! 🌍 unitycodemonkey.com/courseultimateoverview.php 👍 Learn how to make BETTER games FASTER by using all the Unity Tools and Features at your disposal!
@@NoldoWalker I cover area types in the end of the video, you can use that to disable the player from going somewhere if you're using NavMesh to move the player. Each agent has their mask for areas they can traverse, you can make that different for the Player or NPCs
@@CodeMonkeyUnity i mean how to prevent some character to move if it controled by player. Other words : is navmesh working same way if you control actor by keys trough AddForce / aplying new transform.position value
One thing that i'd like to add is that there's a Component called NavMeshObstacle that has a few settings and can be made an obstacle at runtime without needing to be baked. That's very usefull if you make a game where the walkable area can lessen mid-game, for example a Strategy Game where you build buildings. Adding the Component to the buildings Prefab will make it so that the buildings will no longer be considered walkable for Agents, even if there is a pre-baked navmesh there
OH my gods thank you!! The old tuts i watched told me to pull up NavMeshSurfaceComponenet which I'm not sure exists anymore and I was about to have a breakdown because I didn't know how else to get the level working. THANK YOU!
First video i've seen of yours and won't be my last! Thank you very much for going through this, especially the second half where you explained every option in NavMesh. I feel a lot of tutorials show you but don't care about understanding, which leaves you dry the moment you try to change something for your own game. But now I properly understand how NavMesh works, and have utilized it great in my game! Have a great day!
I would like to see how to manage bunch of entities trying to achieve the same position. Sometimes, there are a kind of clamping between all moving entities or entities that seem bouncing trying to reach their goals and not stop when there are a few of them at the goal position. I think the best way to manage that is with flow fields but I would like to see an approach with only nav agents, nav obstacles and set them dynamically. Great content as usual! :)
Unity's NavMesh already has object avoidance built-in, so with the default settings you won't see them overlap. You can see that in action in the RTS game where I used NavMesh ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-y601TRfoxc4.html For a massive amount of agents then yeah using flow fields would probably be the better approach.
@@CodeMonkeyUnity Thank you so much for taking the time to answer it to me. And thank you for all your content as usual. The best content and explanations as usual dude, thanks!
This is fantastic - would love to see this with some logic using unityVS with scenarios like the Nav agent picking up then dropping off a box at his destination. Thanks CM!
I get annoyed by your ads, but goddamn the tutorials are clear and awesome. Brackeys one got a bit outdated so I came here, and found everything that I needed. Thanks!
As it stands, the game I'm making doesn't require this fancy nevmesh. But I do love watching your videos. It's both entertaining and make my mind go wild from thinking of all the crazy ways I could use the different things you introduce to us. Love from the 🥔 gang.
Interesting. the "official" tutorials seem to state that you need the NavMesh surface component, still in preview state, to get this working. Very confusing documentation at Unity that has caused many hours of frustration. This tutorial is great though. Thanks.
I've just watched the video to learn about Unity's navigation and I have a quick question: Currently i'm using a Rigidbody to move a character but I want it to navigate around different obstacles. Do I now use the NavMeshAgent to move the character instead of using the RigidBody?
Great video as always Also can you make a video for working in with the ide cause every other tutorial is taking about the text editor instead of the actual ide thanks
I love these tutorials! I bought your Udemy course as soon as I started this video and saw the link! Are there any plans to add a 2d pathfinding video to the course? That would help me out on a project of mine.
Thanks! I hope you're enjoying the course! I don't think Unity's NavMesh works with 2D, maybe there's an official extension but I'm not sure. Usually for 2D either I make my own ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-alU04hvz6L4.html Or use the A* Pathfinding Project ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-46qZgd-T-hk.html
I am working on an RTS, and thinking of using A* package from Assetstore. The dilemma is that should I use my own grid and things like breakpoints, or the NavMesh? NavMesh is much easier of course and fine-grained. But then my maps might get large. So, Code Monkey, do you have any idea if NavMesh is performant enough to be the goto tool in RTS games for characters walking around, chopping wood, etc. What is your experience?
It really depends on how big are your maps and how detailed/irregular they are, but yes in general for a RTS you do want a NavMesh The A* Pathfinding asset is insanely performant so unless you have a giant planet sized world or thousands of units I don't think you'll find many issues.
You can also use it for the player, either as kind of like an RTS to tell the player where to go, or just ask the NavMesh ifthe position where the player wants to go to is walkable docs.unity3d.com/ScriptReference/AI.NavMesh.SamplePosition.html
@@CodeMonkeyUnity It's weird because I replicated what you did in the video, except with a cube controlled by me, and the cube just wouldn't go up the stairs :/
Hi, I am a novice unity game developer and I am facing an Andriod Unity Webgl problem where my canvas elements are not getting fit on any android device screen even though I set the canvas scaler to scale with the screen size. I went through a lot of documents but I couldn't figure out the answer. Please help me solve this issue as I worked really hard on that game. Please Help!
I did cover interaction with Game Objects and DOTS quite a while ago ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-XomlTHitAug.html It's been a while since I made that video so not sure if there's a better method nowadays.
Absolutely love this type of video! And I have a quick question - if I am working on a project that involves the 3d navigation of a robot in outer space, can NaveMesh still function properly?
Do you mean baking a sphere navMesh? I don't think the default NavMesh supports that, I think you would need to manually stitch multiple meshes together
This video is cool explaining the basics, but how to really use it? How to add e.g. an animation when it jumps from one plattform to another? How to use it with physically driven objects etc.?
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
Is it good practice to make the player an agent in an isometric 3d game? For example my Player has a CharacterController that handles the general movement of my character - for example it walks to the location where i clicked. But it will not avoid objects. Would it be good idea to make my player a navagent to have pathfinding? How do navagents interact with objects that already have a charactercontroller attached?
Either you would use an Agent or a CharacterController, not both since they serve the same purpose (moving the object). And yes for a point and click making the player an Agent is a great way to do it
@@CodeMonkeyUnity damn that was a fast answer, amazing that you are always around and answer questions even on older videos. Thanks a lot, i highly appreciate that
You can add the NavMesObstacle Component if you want things to be considered an Obstacle during runtime, that's useful for example when you build a strategy game so units don't walk through buildings you build. If you want to bake an entire navmesh during runtime then Unity can't do that by itself, but there's a plugin called High Level Navmesh Building Tools that you can download from Unity to add components that you can add to gameobjects through code to make them considered for navmesh.
Unity's NavMesh only supports 3D, that's why for my 2D games I normally either used my own custom Pathfinding or the A* Pathfinding Project ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-46qZgd-T-hk.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-alU04hvz6L4.html
Is there a way to make the player hide from the enemy using NavMeshComponent? I'm making a game where the player has to hide from the enemy which is like a warden in order to get to the end. I want to to make the player be able to hide behind walls and avoid the wardens detection.