Setup 3D Pathfinding Agents In Minutes Using Unity
HTML-код
- Опубликовано: 16 мар 2022
- Unity offers so many tools that get under utilized... The Nav Mesh being something that is so powerful and used to be such a pain to setup in older engines yourself.
I show how you can setup working pathfinding in a game in literally a few clicks. Obviously this is a simple example, but I think its important to jump into using it yourself to start playing around with it, and I think people get intimidated without seeing how easy it really is.
✨Want to support the channel?
Buy me a coffee ☕: ko-fi.com/bmoli
➤SUBSCRIBE to see follow up videos in how we can use Nav Meshes in interesting ways.
➤LIKE the video if you enjoyed, it really helps the channel!
➤Join our DISCORD SERVER to become a god amongst men: / discord
Thanks for watching!
#bmo #unity #tutorial
I like how straight your way of explaining things to audience. No too much talking. Just Pure knowledge.
Dude your tutorials are A1 quality and instruction, gonna be the next big gamedev tutorial channel. Keep it up!
You may have to install AI Navigation in package manager, Window > Package Manager. Then find the AI tab towards the top under Window
Thank you!
Thanks..!
so much use in just a few clicks. this is awesome! thank you!!
this is crazy i programmed pathfinding and now i see this. Its mindblowing
Method fast and efficient.
BMo your vids are consistently helpful
Yeah honestly you are probably the best man for tutorials I have found as I learn Unity 3d, tysm
You make it so easy, thank you for this tutorial!
Finally I found someone who can explain this good! Thank you!
easy and clean tutorial. This is exactly what i needed, the simple way to implement pathfinding. Now i have a general idea of how to add enemy ai in my game. Thank you
You are awesome dude! That's what i was looking for
that helped me in a lot of ways. thanks for making things clear!
This is an AWESOME tutorial!
I expecting things to be challenging but I literally have Baldi up and running in my game already!
thanks so much, there was just 1 problom that i had and couldnt find but u solved my problom, thank you.
i didnt know unity had this tool. Amazing!
The best tutorial i have ever seen
many thanks Mr BMo
this would be a good resource for a game jam game...i need to start a resource list now. lol
thanks, really usefull tutorial
Thanks So Much!
Simple and direct to the point. Very good for the "hello world" in unity pathfinding :)
Agreed! Very good tutorial :)
OMG Thank you really much
omg. I never thought it was this easy
4:48 it searches for an object with the "MainCamera" tag, not its name. Great video btw!
Nice fast and easy.
This man is a god !!!!!!!!!!!!!!!!!!!!!!!!!!!!
man i think i love you you actually know how to make a competent video
Really cool!
Amazing!
Love how the videos are, quick, no bullshit! I only sub to a few tutorials channels, block the youtube algorithm, its almost never useful. BUT YOU ARE! THANK YOU 💘
sick video
good stuff
thank you
Thanks
Can you use ray casting or whatever it is called so that a enemy character has to see you first as in it goes into a chase mode while it sees you and then a search mode for a couple seconds after
My navmesh navigation menu only has agents and areas
Amazing
Please help, when I insert the new script into unity it say "The type or namespace name 'Raycast' could not be found (are you missing a using directive or an assembly reference?)" Any idea on how to fix it?
Do you have to bake everything? For example can you have the wall move around and the agent dynamily find the updated path at runtime?
Future self here, and yes you can, if anyone is wondering
@@Build_the_Future How?
Yeah how
Unfortunately neither the Mouse hit nor raw Vector3 moved my agent. Any idea why not?
For enemies and dungeons created dynamically in the code, how do I set up AI navigation? I already have a walkable mesh geometry, and I suppose that I need to instantiate a NavMeshAgent and assign the walkable mesh to it. Additionally, I should assign the NavMeshAgent to the enemies. Is this correct? Thanks :)
Just one year was enough to change everything completely so following the tutorial isn't easy... thanks Unity devs...
Yep..
object reference not set to an instance of an object. on line 15?
Terimakasih banyak
If you can't see the blue navmesh surface after baking, make sure Gizmos are turned ON!
how to do that with more enemys/players
I don't have the "bake" and "object" options in the navmesh menu. Does anyone know why?
Same here
Pog!
hey just wanna ask, can i use a* pathfinding algorithm for 3d games?
Yes you can
How do fix navigation obsolete?
What about flying entities?
can this be done in 2D?
Very nice tutorial! One question: I use a character and animation I downloaded from Mixamo because I want a "person" to walk to a specific location and not run into obstacles. When I first configured the character to walk, all was fine. As soon as I added a NavMeshAgent to the character, all of a sudden it floats above the ground by a noticeable amount so it's walking on air. Any idea what might be causing that? Thanks.
Ok so how do you cahnge the speed it goes towards its target? Thx.
there is a speed variable in the Navmesh agent component.
not sure if this is still relevant to you but, it's just "agent.speed = 1" but you can change 1 to whatever you want
or you can also go to the top of the script, add a variable for speed "public float speed = 5" and you will be able to change 5 to anything when you look at the script in the editor
Omfg... It loos too good to be true. Where is a problem? Is it slow? Is it very restricted to map size? I am about to make game with movement type like desperados 3, so I look for exactly this logic. Did you guys find any big problems with it?
Can you do this in 2d games? If so can you do a tutorial on how to do this with 2d sprites and 2d project ♡
I'm wondering the same thing, but with a fixed, pre-rendered image as the "floor." Sort of like a top-down tabletop experience.
@SkeepyMakesGames thank you ♡
Ah man brackeys was great, I started learning game dev with them like 12 years ago or something, sadly they no longer put stuff out there but I'll defo go back and see if i can find that video ♡♡
I have no NavMeshAgent component
It's all fun and games until you start trying to use animated characters with a navmesh
Navmesh is so annoying. You cant do different areas on terrain without some funky workarounds, cant draw it manually so you have to rebake it EVERY time you make a change, and dealing with off navmesh interactions are a pain.
thers is not object or bake tab
Thanks