IF YOU'RE HAVING PROBLEMS WITH UNITY FREEZING WHILE TRYING TO DO RUNTIME NAV MESH BAKING: Make sure all the objects that are under the layer that you're baking (which by default, is everything) is NOT set to static. If anything that you are trying to bake on runtime is static, Unity will most likely freeze and you'll have to task manager kill it. (At least that was the case for me). This took me like 4 consecutive hours to figure out. I hope this helps someone else who might be having trouble.
I know you're probably not gonna read this but I love you so much dude... I've been scratching my head for the last 3 hours trying to figure this out, I was looking for an answer on google but I couldn't find one, this needs to be Pinned fr.
For those who couldn't make the player agent move in example 3, I've got the same problem, it can be solved by assigning the Game Object in start function of the Player Controller script. I do it this way: void Start() { player = gameObject.GetComponent(); cam = Camera.main; } but I believe there're better ways :) Hope it helps with others facing the same problem as mine
Thanks, this was my issue. i assigned the player controller script to the player prefab in example 3. then from your advice added the below code to the start function in the player controller script. would be good if that was included in the tutorial but its free. i hope this helps others as it can be really frustrating. void Start() { agent = gameObject.GetComponent(); cam = Camera.main; }
"Making games is easier than you think, I know that Brackeys is teaching you how to for free, but if you give us a lot of money, we can teach you the exact same stuff he is."
Nice as always, but let me comment here an adjustment I had to make on your original examples which I've downloaded: When the LevelGenerator script instantiates the player, currently it doesn't have a player controller script on it, so I had to include the script on player prefab and also had to include both cam and agent references on code, before it instantiates the player.
LD51 and I still come back to these videos , amazing. Maybe i'll switch UE soon , but for small browser games Unity is better. (its also good for bigger games of course but that is what I use it for)
Brackeys, two questins: 1) Will you participate in Universal Unity Challenge? 2) Will you make some summary of that Unity event? Like explanation of new features?
If you're having trouble getting the player controller script to work on when the player is dynamically generated. You can add this in. void Start() { if (cam == null) { cam = Camera.main; } if (agent == null) { agent = GetComponent(); } }
Bro I love you so much. You only help me with cool tutorials and I actually made 4 games (nothing posted yet) but im so thankful for your help love your content and keep it up!!!
Thank you so much for making these free tutorial that are fun to watch, youre always friendly in the comments as well. I've just started learning how to code as being a game designer has been my dream ever since I was little, I just wanted ask, what are some general tips that would make learning languages like c# easier and what are somethings that you wish you know when you were learning?
This is so much better than the original NavMesh functionality. I noticed it only works with terrain. This works with anything that has the designated layer mask. Why isn't it already a part of unity? I've got 2020 and there is no such functionality. The NavMesh component package is great.
Brackeys, could you do a sort of realistic FPS series. Not multiplayer or actually a game. just a couple episodes on how to achieve things like good scopes, aiming, weapon sway and stuff like that. there really is no updated tutorial on how to do this! it would be very appreciated! if you like this idea, like the command so he can notice it.
I don't know if Unity has it inbuild now, but you can certainly implement A* yourself. Straight line distance should be good enough for most cases. You'd just have to build the graph yourself, which isn't too hard. A simple solution would be to make your graph a grid and use the Physics system to determine which grid squares are blocked.
Cool the first one helped a lot but this one doesn’t because of the type of game I am making but it was still cool. If you can make a video about selecting characters because I have more then one nav mesh agent that would be handy but I don’t mind if you dont 😃
Sebastian Lague has a great tutorial series on making a complex Pathfinding system using A*. I believe it even features multithreading with multiple agents.
Correct, if the obstacles / walls move and change, the flying enemies should not get stuck. Also if there is no ground, this can be a problem because usually a ground is needed to calculate the way to move. But maybe Brackeys have some good work arounds for that.
What I'm saying is, you don't need to take into account the path finding system at all if there are no obstacles in the air. You're just moving a transform from one world position to another, with nothing to stop you.
I want to learn that because when i select and move a group of units they keep trying to get to the destination and end up moving in a circle there like some kind of ritual
But i hav an idea, make prefabs in the shape formation and when u click on the ground the units will find the nearest prefab to set destination. Probably hav a bool like if unit collider hits the formation point they will find another spot to stand. Similar to waypoints. What do u think?
Make the formation group of gameobjects with about 50 spheres, cubes etc so the units will always have a position in the formation. Number the formation positions from left to right or whatever and refer to them in code
How can I move a labyrinth with gaps? The navmesh obstacle just creates a box or a capsule around the whole object... How can I let it render these gaps?
No, however making an AI for platformers is very easy and can be done in minutes if you're experienced. If you want a complex Ai look into Line casting and ray casting and calculate in a script where the AI is allowed to go using layermasks. Hope you get you're game working, and that this helps!
@@onesketchyguy6050 heads up if you want do line of sight, use physics.linecast, dont use raycast when doing line of sight, i spent way to much time messing with raycast when linecast did it for me x10 times better and more accuretly.
Hey Brackeys. I'm following along on Unity with your project example. It works great and I'm learning a lot very fast. I just noticed now that the Player gameobject doesn't have the Player Controller component script on it by default. On the Example 3 Scene I'm not sure how to attach the Player Controller Script to the Player as the the Player exists only in runtime. When I try to connect the Player Controller script to the Player prefab, I can only attach the Player to the public Agent but cannot attach the Main Camera to Public Cam. Where am i going wrong? Thanks!!
You have to write the script and attach it to the player game object. Then when you compile the script, you can drag the Main Camera into the location on the Editor. This is the script: using UnityEngine; using UnityEngine.AI; public class PlayerController : MonoBehaviour { NavMeshAgent agent; public Camera cam; // Use this for initialization void Start () { agent = GetComponent(); } // Update is called once per frame void Update () { // click left mouse button if (Input.GetMouseButtonDown(0)) { // create a click from the SCREEN SPACE (2d) // into a ray in the WORLD SPACE Ray ray = cam.ScreenPointToRay(Input.mousePosition); RaycastHit hit; // cast the ray and store information of the location the ray has hit if (Physics.Raycast(ray, out hit)) // returns true if actually does hit something { // if the ray its something it is stored in 'hit' (also code ) // use 'hit' to move our dude agent.SetDestination(hit.point); // hit the location the ray hit on naveMesh } } } }
Honestly none of these two replies actually solve your problem I guess. Since I have the same question as you did. Well, my solution is to drag the MainCamera at runtime but that doesn't seem to solve from roots. Thus I tried to find solutions for modifying the script and here is a try: For Camera Variable, use answers.unity.com/questions/49126/getting-a-camera-at-runtime.html as a reference and you can easily assign the MainCamera to the PlayerController Script; For NavMeshAgent, use the code " agent = GetComponent();" I hope this can solve your confussion.
This is an amazing tool and as always an great tutorial on utilizing it, especially with procedural generation, very cool. I am very interested in using this in a slightly different way though and I've searched for resources on the subject and came up empty so far. Is there a way to allow end users to input their own models and utilize run-time Navmesh generation to allow AI agents to navigate it? I'm trying to create a tool for myself and other architecture students to use to place their building model, place some spawn nodes, adjust what kind of AI they would like to spawn, place pre-made objects/furniture with set tags for those ppl to interact with (ppl who work in the building, visitors, ppl coming to eat, kids playing, etc... think SimTower). That way it could be a conceptual tool to make the building model come alive, test procession/circulation, emergency exit procedures, etc... Since this is such a new feature I can't find a damn thing about it.
the solution for problem of Camera (im brazilian, sorry for poor english): in Script LevelGenerator.cs, make this alteration in camera. It put her in ruintime: public class LevelGenerator : MonoBehaviour { Camera camera; public NavMeshSurface surface; public int width = 10; public int height = 10; public GameObject wall; public GameObject player; private bool playerSpawned = false; // Use this for initialization void Start () { //ADD CAMERA camera = Camera.main; player.GetComponent().cam = camera; GenerateLevel(); //UPDATE NAVMESH surface.BuildNavMesh(); }
Well, as usual, Brackeys made an inflexible tutorial for a very small margin of people. I mean, I guess this is Unity's fault for randomly removing stuff. But you have to import this into your project, github.com/Unity-Technologies/NavMeshComponents It's made by Unity, you can't get a reference to NavMeshSurfaces without it.
The reason behind this is because NavMeshAgent X/Y/Z is changing all the time (by 0.00000x value) when animation is applied and then it starts to become glitchy.
Hey! Can you do an advanced car tutorial? Like how to make our own script with the torque, rpm and acceleration and everything without using the standard assets? I would really appreciate it! :)
I have a level generator which uses multiple pre-made blocks to create a whole level. Would I just hold an array of NavMeshSurface's, then cycle through each one calling BuildNavMesh()?
what if instead of a single navmesh "floor", i have several floors(squares) connected and want to generate navmesh in runtime? i'm building a navMesh for each one but the game kinda lags when it happens, is there a way to join the little navmeshsurfaces and build a bigger one, so only building the nav mesh once?
Hello, your tutorials are very useful. I wanted to know if you can do one of ACTION BAR, if possible ... Thanks for reading and sorry for my English. Greetings from Argentina.
For performance if you have a really large map. I wonder if it would be possible to re-bake a nav mesh in one area to another. You bake once in an area and once you leave it, it bake for the next area either by a set size or based on the position they're heading. Seeing as it might be taxing to do a large mesh at once so doing a smaller each time you leave one seems more optimal. Then what if you have obstacles you can hang and jump up to, to climb. Or jumping on walls and stay there I wonder how you would do that with a script along with the nav mesh
this is great! is there a way to make it even more dynamic? so for examle the moving blocks are enemies. choose the less crowded area and also do not move continuously, maybe wait at some point until the area clears?
Anyone who has issues where Unity crashes upon Run-Time Generation in the 2018 Unity 5.1 and later versions. - Static Option on Game Objects in scene cause the issue. - The crash only happens if NavMesh.Build() is called on Start and onwards. * Essentially you have to call the NavMesh.Build() in Awake() or in OnEnable(). This thread gives you a bit more on the details: issuetracker.unity3d.com/issues/navmesh-runtimenavmeshbuilder-source-mesh-combined-mesh-does-not-allow-read-access-when-batching-static-is-turned-on
Hi Brackeys great game dev resources, I'm a 3d artist without knowledge of coding but eager to learn it, and your channel is one the bests to make that happen, while trying to do that I find my self (I'm sure others too)most of the time lost where to begin in term of coding, In every tutorial I find different functions,classes,terms,names to make things happen and I say i would never guessed that all by my self. I'm wondering if you can provide us a tutorial about the logic and how do you proceed in coding a generic game of your choice,I'm not asking for a specefic precis lines of codes but a guide where to go or what to use from C# to make something happen for example: " if you want to make your character jump you should be using such terms " and from there anyone can check that out in the C# documentation and know how to integrate that in their code. I'm sorry if this sounds like a cave man talking :) but this is how I could express my actual issue Thank you so much again for your channel and your time
Good tutorials, i really like your videos. Could you make a tutorial on how to make sound in Unity more realistic? Because as i understood the Unity Soundsystem, it doesn't matter if and what form of obstacle is between an Audio Source and a Listener; but in Reality, walls dampen the sound, and if doors are present, it will sound as if the Audio Source is behind the door since thats the easiest way for the soundwaves to go.
Hey I'm not able to navigate the cylinder block by clicking on the mesh.I used the same steps but still not able to figure out. Any help would be great!!
Great videos, If you had an open world game, with a destructible wall, would you trigger the navmesh to rebake when you destroy the wall allowing access for the AI to travel through? Thanks
Brackeys can you please do a course of 3d car racing game? There are some tutorials on UA-cam about it but either they don't provide valuable information or they are not in high quality. Please?
@Brackeys Have you done a tutorial on grappling hooks and making a character vault over a block or something? I'm going to go through all the videos, but for my own purposes I would like to know where to start for this particular feature.
Hi brackeys thanks for your awesome tutorials:) I've a question: how about jumping over obstacles ?? what should we do?? For example I wanna press space key to jump how should I do this?
Couldn't an obstacle without the carve setting turned on be used for crowd AI. Where you want the AI to be able to move around the navmesh (can't have them carve it) while also steering away from each other.
My project procedurally generates levels with non-uniform tiles (distorted 4-sided/6-sided prisms) which themselves are also procedurally generated. The tiles do not fit into boxes/capsules so I can't automatically carve a navmesh. I know specifically where each vertex is and could build a floor mesh if I knew what to do with it afterward. Is there a way I can still create a useful navmesh? The non-carving obstacle option makes it seem like I might as well forget about it and use some form of A*.
IF YOU'RE HAVING PROBLEMS WITH UNITY FREEZING WHILE TRYING TO DO RUNTIME NAV MESH BAKING:
Make sure all the objects that are under the layer that you're baking (which by default, is everything) is NOT set to static. If anything that you are trying to bake on runtime is static, Unity will most likely freeze and you'll have to task manager kill it. (At least that was the case for me).
This took me like 4 consecutive hours to figure out. I hope this helps someone else who might be having trouble.
This is going to sound strange but I love you. I have been trying to figure out this for the last day this was my issue.
I know you're probably not gonna read this but I love you so much dude... I've been scratching my head for the last 3 hours trying to figure this out, I was looking for an answer on google but I couldn't find one, this needs to be Pinned fr.
These NavMesh tutorials are reallly cool! 🤓 We miss you Brackeys ❤️
Same
It's sad that this channel is no more 😢❤️
wow its already been 2 years?
Its nearly 4 years past this video but i am still being led to brackeys videos for my problems. as always WE MISS YOU BRACKEYS
He's back!
Legendary part is that the content in these channel will be enough to feed the community for at least 5 more years :D
For those who couldn't make the player agent move in example 3, I've got the same problem, it can be solved by assigning the Game Object in start function of the Player Controller script. I do it this way:
void Start()
{
player = gameObject.GetComponent();
cam = Camera.main;
}
but I believe there're better ways :)
Hope it helps with others facing the same problem as mine
Thanks, this was my issue.
i assigned the player controller script to the player prefab in example 3. then from your advice added the below code to the start function in the player controller script. would be good if that was included in the tutorial but its free. i hope this helps others as it can be really frustrating.
void Start()
{
agent = gameObject.GetComponent();
cam = Camera.main;
}
Thank you for these tutorials. Using only the first 2 tutorials I was able to get pathfinding working in my procedurally built game. THANK YOU
So glad this is a series slowly getting to more in depth topics about the navmash. Keep up the great work.
Sponsored by Unity, talking about dreams coming true. Cheers bro! Much love from Croatia (=
"Making games is easier than you think, I know that Brackeys is teaching you how to for free, but if you give us a lot of money, we can teach you the exact same stuff he is."
What?
Nice as always, but let me comment here an adjustment I had to make on your original examples which I've downloaded: When the LevelGenerator script instantiates the player, currently it doesn't have a player controller script on it, so I had to include the script on player prefab and also had to include both cam and agent references on code, before it instantiates the player.
LD51 and I still come back to these videos , amazing. Maybe i'll switch UE soon , but for small browser games Unity is better. (its also good for bigger games of course but that is what I use it for)
WOW! I am making a game and i'm stuck on Dynamic Navmesh since yesterday.... You post a video about it... ARE YOU A WIZARD? HARRY?!?!!
Unity pathfinding has become mega powerful since 2014!
Brackeys, two questins:
1) Will you participate in Universal Unity Challenge?
2) Will you make some summary of that Unity event? Like explanation of new features?
If you're having trouble getting the player controller script to work on when the player is dynamically generated. You can add this in.
void Start()
{
if (cam == null)
{
cam = Camera.main;
}
if (agent == null)
{
agent = GetComponent();
}
}
Thanks, I spent a good 15 mins trying to fix this issue, glad you posted this!
Thanksss!!!
Thanks! works!
thank you ;-;
Bro I love you so much. You only help me with cool tutorials and I actually made 4 games (nothing posted yet) but im so thankful for your help love your content and keep it up!!!
Can I hit "Like" more than once? Awsome tutorials, keep the good work!
You are the man! I still don't understand half of what you said tbh lol, but i'm getting there thanks to these vids.
Always good to watch one of your videos before going to sleep ! Keep up the good work 😉
Thank you so much for making these free tutorial that are fun to watch, youre always friendly in the comments as well. I've just started learning how to code as being a game designer has been my dream ever since I was little, I just wanted ask, what are some general tips that would make learning languages like c# easier and what are somethings that you wish you know when you were learning?
This is so much better than the original NavMesh functionality. I noticed it only works with terrain. This works with anything that has the designated layer mask. Why isn't it already a part of unity? I've got 2020 and there is no such functionality. The NavMesh component package is great.
Very useful, I was having trouble with randomly generated levels. I was doing it almost correctly. Thanks!
Great video! Amazing series! This is one of the best game dev channel! Please make more math for video games vídeos.
This is exactly the information I was looking for!
Maybe you can add some enemies too, and they patrol the area and react when they "see" the player
this tutorial is awesome! thank you very much for helping me in my time of need!
You just saved my college project!
Could this work in a 2D game without other 3rd party libraries?
How do you make it dynamic but walkable not an obstacle???
Yes! Brackeys is making an AI series?!
Sponsered by Unity! Wow, congratulations
Thanks for the awesome tutorial, I'm waiting for more
I love this channel! Thanks for all the knowledge
Brakeys, you're the best!
These videos are great, thanks!
Brackeys, could you do a sort of realistic FPS series. Not multiplayer or actually a game. just a couple episodes on how to achieve things like good scopes, aiming, weapon sway and stuff like that. there really is no updated tutorial on how to do this! it would be very appreciated! if you like this idea, like the command so he can notice it.
Thank you for slowing down the talking speed.
For those using older version of unity than the date on this video these features are not available!.
Great tutorial dude !
Can u do sphereical pathfinding???
And good job tbh.
I don't know if Unity has it inbuild now, but you can certainly implement A* yourself. Straight line distance should be good enough for most cases. You'd just have to build the graph yourself, which isn't too hard. A simple solution would be to make your graph a grid and use the Physics system to determine which grid squares are blocked.
Another great tutorial!!! Can you please explain a procedural level generation a bit in next video ...Thank you
Awesome brackeys I love your videos
Sponsored By Unity… 👌🏼well done
Yep this works too!
Cool the first one helped a lot but this one doesn’t because of the type of game I am making but it was still cool.
If you can make a video about selecting characters because I have more then one nav mesh agent that would be handy but I don’t mind if you dont 😃
Would love to see this tutorial with the new system, navmesh is looking a bit different nowadays
Next tutorial A* Pathfinding AI.
Ground & Flying enemies (without ground under it?).
Sebastian Lague has a great tutorial series on making a complex Pathfinding system using A*. I believe it even features multithreading with multiple agents.
Why would you need path finding for flying enemies, unless you have obstacles in the air?
Correct, if the obstacles / walls move and change, the flying enemies should not get stuck.
Also if there is no ground, this can be a problem because usually a ground is needed to calculate the way to move.
But maybe Brackeys have some good work arounds for that.
What I'm saying is, you don't need to take into account the path finding system at all if there are no obstacles in the air. You're just moving a transform from one world position to another, with nothing to stop you.
I know that, thats why i said moving walls and obstacles in the air. ;)
why is brakeys so amazing?
Could you do unit formations on a navmesh (like rts) while we're on the subject?
I want to learn that because when i select and move a group of units they keep trying to get to the destination and end up moving in a circle there like some kind of ritual
But i hav an idea, make prefabs in the shape formation and when u click on the ground the units will find the nearest prefab to set destination. Probably hav a bool like if unit collider hits the formation point they will find another spot to stand. Similar to waypoints. What do u think?
Make the formation group of gameobjects with about 50 spheres, cubes etc so the units will always have a position in the formation. Number the formation positions from left to right or whatever and refer to them in code
How can I move a labyrinth with gaps? The navmesh obstacle just creates a box or a capsule around the whole object... How can I let it render these gaps?
Adamın Dibisin abi
Thanks for this nice video that was that waht i am looking for
perfect tutorial as usual :)
Is it possible to convert this for 2D platformer?
nav mesh only works on 3d :/
No, however making an AI for platformers is very easy and can be done in minutes if you're experienced. If you want a complex Ai look into Line casting and ray casting and calculate in a script where the AI is allowed to go using layermasks. Hope you get you're game working, and that this helps!
@@onesketchyguy6050 heads up if you want do line of sight, use physics.linecast, dont use raycast when doing line of sight, i spent way to much time messing with raycast when linecast did it for me x10 times better and more accuretly.
Hey Brackeys. I'm following along on Unity with your project example. It works great and I'm learning a lot very fast. I just noticed now that the Player gameobject doesn't have the Player Controller component script on it by default.
On the Example 3 Scene I'm not sure how to attach the Player Controller Script to the Player as the the Player exists only in runtime. When I try to connect the Player Controller script to the Player prefab, I can only attach the Player to the public Agent but cannot attach the Main Camera to Public Cam. Where am i going wrong?
Thanks!!
You have to write the script and attach it to the player game object. Then when you compile the script, you can drag the Main Camera into the location on the Editor.
This is the script:
using UnityEngine;
using UnityEngine.AI;
public class PlayerController : MonoBehaviour {
NavMeshAgent agent;
public Camera cam;
// Use this for initialization
void Start () {
agent = GetComponent();
}
// Update is called once per frame
void Update () {
// click left mouse button
if (Input.GetMouseButtonDown(0))
{
// create a click from the SCREEN SPACE (2d)
// into a ray in the WORLD SPACE
Ray ray = cam.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
// cast the ray and store information of the location the ray has hit
if (Physics.Raycast(ray, out hit)) // returns true if actually does hit something
{
// if the ray its something it is stored in 'hit' (also code )
// use 'hit' to move our dude
agent.SetDestination(hit.point); // hit the location the ray hit on naveMesh
}
}
}
}
just try tagging your MainCamera Gameobejct,in the heirarchy, to prebuilt tags "MainCamera" . Works?
Honestly none of these two replies actually solve your problem I guess. Since I have the same question as you did. Well, my solution is to drag the MainCamera at runtime but that doesn't seem to solve from roots. Thus I tried to find solutions for modifying the script and here is a try: For Camera Variable, use answers.unity.com/questions/49126/getting-a-camera-at-runtime.html as a reference and you can easily assign the MainCamera to the PlayerController Script; For NavMeshAgent, use the code " agent = GetComponent();" I hope this can solve your confussion.
That's what i currently need ! Thx ! ;)
I, your videos are amazing ! Could you please make a video about proceduraly generated levels ! you're amazing !
Nice work
I miss Brackeys..
No more miss, he came back 😊
This is an amazing tool and as always an great tutorial on utilizing it, especially with procedural generation, very cool.
I am very interested in using this in a slightly different way though and I've searched for resources on the subject and came up empty so far. Is there a way to allow end users to input their own models and utilize run-time Navmesh generation to allow AI agents to navigate it?
I'm trying to create a tool for myself and other architecture students to use to place their building model, place some spawn nodes, adjust what kind of AI they would like to spawn, place pre-made objects/furniture with set tags for those ppl to interact with (ppl who work in the building, visitors, ppl coming to eat, kids playing, etc... think SimTower). That way it could be a conceptual tool to make the building model come alive, test procession/circulation, emergency exit procedures, etc... Since this is such a new feature I can't find a damn thing about it.
the solution for problem of Camera (im brazilian, sorry for poor english):
in Script LevelGenerator.cs, make this alteration in camera. It put her in ruintime:
public class LevelGenerator : MonoBehaviour {
Camera camera;
public NavMeshSurface surface;
public int width = 10;
public int height = 10;
public GameObject wall;
public GameObject player;
private bool playerSpawned = false;
// Use this for initialization
void Start () {
//ADD CAMERA
camera = Camera.main;
player.GetComponent().cam = camera;
GenerateLevel();
//UPDATE NAVMESH
surface.BuildNavMesh();
}
Well, as usual, Brackeys made an inflexible tutorial for a very small margin of people.
I mean, I guess this is Unity's fault for randomly removing stuff. But you have to import this into your project,
github.com/Unity-Technologies/NavMeshComponents
It's made by Unity, you can't get a reference to NavMeshSurfaces without it.
very nice !!!
I would like to see how you work with HeighMesh thats not just a plane but for instance "low poly island" which has height (movement on top of that)
The reason behind this is because NavMeshAgent X/Y/Z is changing all the time (by 0.00000x value) when animation is applied and then it starts to become glitchy.
Thank you sir!!!
Hey! Can you do an advanced car tutorial? Like how to make our own script with the torque, rpm and acceleration and everything without using the standard assets? I would really appreciate it! :)
Thank you
its very cool thx!
I'll try to use this on my rts game where the player can build new buildings and navmeshes would update once a building is placed
I have a level generator which uses multiple pre-made blocks to create a whole level.
Would I just hold an array of NavMeshSurface's, then cycle through each one calling BuildNavMesh()?
Why Can I not add the camera to the player in example 3 unless the game is already playing?
what if instead of a single navmesh "floor", i have several floors(squares) connected and want to generate navmesh in runtime? i'm building a navMesh for each one but the game kinda lags when it happens, is there a way to join the little navmeshsurfaces and build a bigger one, so only building the nav mesh once?
watch the next video in the mini-series
@@juanponcedeleon8617 too late now, but thanks ^^ I think I solved it at the time tho
MyChips yeah I guessed so but I did it for those who just watched it ( :
Hello, your tutorials are very useful.
I wanted to know if you can do one of ACTION BAR, if possible ...
Thanks for reading and sorry for my English. Greetings from Argentina.
Thanks.
hey,
this video is missing in Unity Beginner Tutorials
For performance if you have a really large map. I wonder if it would be possible to re-bake a nav mesh in one area to another.
You bake once in an area and once you leave it, it bake for the next area either by a set size or based on the position they're heading. Seeing as it might be taxing to do a large mesh at once so doing a smaller each time you leave one seems more optimal.
Then what if you have obstacles you can hang and jump up to, to climb. Or jumping on walls and stay there I wonder how you would do that with a script along with the nav mesh
I know it's 5 years later. But you could just have multiple NavMesh planes right?
this is great! is there a way to make it even more dynamic? so for examle the moving blocks are enemies. choose the less crowded area and also do not move continuously, maybe wait at some point until the area clears?
Anyone who has issues where Unity crashes upon Run-Time Generation in the 2018 Unity 5.1 and later versions.
- Static Option on Game Objects in scene cause the issue.
- The crash only happens if NavMesh.Build() is called on Start and onwards.
* Essentially you have to call the NavMesh.Build() in Awake() or in OnEnable().
This thread gives you a bit more on the details: issuetracker.unity3d.com/issues/navmesh-runtimenavmeshbuilder-source-mesh-combined-mesh-does-not-allow-read-access-when-batching-static-is-turned-on
Hi Brackeys great game dev resources, I'm a 3d artist without knowledge of coding but eager to learn it, and your channel is one the bests to make that happen, while trying to do that I find my self (I'm sure others too)most of the time lost where to begin in term of coding, In every tutorial I find different functions,classes,terms,names to make things happen and I say i would never guessed that all by my self. I'm wondering if you can provide us a tutorial about the logic and how do you proceed in coding a generic game of your choice,I'm not asking for a specefic precis lines of codes but a guide where to go or what to use from C# to make something happen
for example: " if you want to make your character jump you should be using such terms " and from there anyone can check that out in the C# documentation and know how to integrate that in their code.
I'm sorry if this sounds like a cave man talking :)
but this is how I could express my actual issue
Thank you so much again for your channel and your time
Good tutorials, i really like your videos.
Could you make a tutorial on how to make sound in Unity more realistic?
Because as i understood the Unity Soundsystem, it doesn't matter if and what form of obstacle is between an Audio Source and a Listener; but in Reality, walls dampen the sound, and if doors are present, it will sound as if the Audio Source is behind the door since thats the easiest way for the soundwaves to go.
Hey
I'm not able to navigate the cylinder block by clicking on the mesh.I used the same steps but still not able to figure out.
Any help would be great!!
Great videos, If you had an open world game, with a destructible wall, would you trigger the navmesh to rebake when you destroy the wall allowing access for the AI to travel through? Thanks
Brackeys can you please do a course of 3d car racing game? There are some tutorials on UA-cam about it but either they don't provide valuable information or they are not in high quality.
Please?
Can you sometime do a tutorial on client prediction and server reconciliation for networking?
Please teach us how to make a maze model in blender like you did in your previous video
For an RTS, would obstacle avoidance be good enough, since regenerating for that many moving objects would be performance heavy?
I am curious about this as well. But I think you kinda answered it already
Can you do jumping at different heights?
thx mate
@Brackeys Have you done a tutorial on grappling hooks and making a character vault over a block or something? I'm going to go through all the videos, but for my own purposes I would like to know where to start for this particular feature.
Do you think you could make a navmesh tutorial on pathfinding a moving object instead of the mouse? thatd be really cool for fps ai
Can you make tutorial a maze which can automatically changed gate open close system
Awesome
Hi.
How can I do the same but between two AIs.
those components conflict when being together?
Hi brackeys thanks for your awesome tutorials:) I've a question: how about jumping over obstacles ?? what should we do?? For example I wanna press space key to jump how should I do this?
I have a navmesh in the scene with it's normal inspector window, but I don't seem to be able to locate it in the hierarchy like Brackeys does.
Sir We love you :)
Couldn't an obstacle without the carve setting turned on be used for crowd AI. Where you want the AI to be able to move around the navmesh (can't have them carve it) while also steering away from each other.
My project procedurally generates levels with non-uniform tiles (distorted 4-sided/6-sided prisms) which themselves are also procedurally generated. The tiles do not fit into boxes/capsules so I can't automatically carve a navmesh. I know specifically where each vertex is and could build a floor mesh if I knew what to do with it afterward. Is there a way I can still create a useful navmesh? The non-carving obstacle option makes it seem like I might as well forget about it and use some form of A*.
Brackeys can you show how to make random map generator (e.g: that you used in this video)
Great!