This video just solved a major hurdle for me with my nav! Thank you so much for doing the deep dive on it and providing the documentation links. I never would have found some of the settings if it wasn't for this video!
I think it would take me years to learn so much valuable information about AI and unity, you've made it so much easier and fun. thanks for the new tutorial.
Thank you so much! This was the only thing that was bothering me! My player pushed the enemy before killing it, but now I could solve it. Good luck in the future!
OH MY GOD WHY DOES IT HAVE LESS THAN 10K VIEWS, SOMEBODY EXPLAIN PLZ Great tutorial ! Thank you very much I think I will binge watch the whole serie right now, and you got a new subscriber ;)
On my machine the performance was not significantly different, but you can download the full project on github and deploy to your target device(s) and see how it is on your target hardware!
Hey how did you get the data about the avoidance cells that turn white and red? Also the one where which 8 agents its currently avoiding ? I wasn't to find it in your github project.
Great question! That's the built-in debug visualization. If you keep open the "Navigation" window (Window > AI > Navigation), ensure the NavMeshAgent component is not collapsed on the GameObject, and select the NavMeshAgent you should see those controls in the Scene View. There will also be some options at the bottom right of the Scene View to enable different aspects of the debug visualizations.
Problem I always have with Navmesh agents avoidance is that it simply does not work if an agent is stopped in front of other agent, they start pushing each other. To circunvent it I use the Agent/Obstacle swap method, but it makes everything so much more complicated... I tried AStar Pathfinding instead of Unity Navmesh, same problem... Is there any other way to make it work? I mean, if both agents are moving, RVO works ok, they avoid each other, specially if they are moving against each other, but if the agent in front stop, the one moving behind will simply push it out of its way, as if it suddenly became invisible.
Hmm... As long as the agents have the same priority they should also consider stopped agents. I have tried this many times successfully that agents route around a stopped agent as long as there are not more than 8 nearby to consider. Can you validate your configuration of the agents?
@@LlamAcademy I tried that for months, got really sick of seeing them pushing each other, then I used the obstacle trick... Even when the stopped agent had 0 as priority and the one moving 99,simply push each other... I tried it with different combinations too Tried the Astar pathfinding, the paid version, same results Once an agent is stopped, the others simply push it Por, perhaps they are pushed WHILE STOPPING, it could be just that, anyway doesn't work...
This doesn't work if you want your enemies (the nav agents) to just be different instances of the same prefab, as enabled is a extern variable. So when you disable one agent you end up disabling them all.
The vast majority of these configurations are on the NavMeshAgent. Only towards the end when I go over the advanced bake settings are we dealing with the NavMeshSurface component
Hi! Yes you can do custom movement on the NavMesh. You can call SetDestination to calculate the path to a given location, or use NavMeshAgent.CalculatePath() to get a NavMeshPath that represents how to get from point A to point B. You can then write your own logic to walk around on the NavMesh with fully custom code, or using NavMeshAgent.Move(). Depending on your use case, it may be better to use A* and something like RVO2 agent than to try to monkey with the NavMesh APIs and doing custom movement.
@@LlamAcademy ahaha, sorry explanation was bad, that looks not like colliding but entering each other when target movement position for them all is the same NavMesh.avoidancePredictionTime = avoidancePredictionTime; // make it lesser and bugfixed a little
Bro your AI tutorials are best but bro please stop doing this "You-Yes You" part it sounds too cringe I am literally having goosebumps right now out of this cringe .
I like your videos ,but please stop with this" I'm here to help you, yes you", I always hesitate to click on your vid because of this intro. It's so much cringe my brain stops working. Please 🙏🙏🙏
Nowhere in this video does it say how you tweak these things. Avoidance time etc need to be explained how it is set in Unity instead of just theoretical how it works.
Hi 👋. Sorry you didn't find that to be clear. Since this is a little more advanced tutorial I assumed you already knew where the configurations were done. Here are the relevant documentation links, I will also update the description to include those: Most of the configurations are on the NavMeshAgent itself: docs.unity3d.com/Manual/class-NavMeshAgent.html The higher level configurations such as the pathfindingIterationsPerFrame can be set at the NavMesh class: docs.unity3d.com/ScriptReference/AI.NavMesh.html And towards the end when talking about the surface configurations, those are on the NavMeshSurface component: docs.unity3d.com/Packages/com.unity.ai.navigation@1.0/manual/NavMeshSurface.html
This video just solved a major hurdle for me with my nav! Thank you so much for doing the deep dive on it and providing the documentation links. I never would have found some of the settings if it wasn't for this video!
I think it would take me years to learn so much valuable information about AI and unity, you've made it so much easier and fun. thanks for the new tutorial.
🙏🙌
This channel is a hidden gem. Hope you get the recognition you deserve.
Excelent... No words can describe the quality of this video. THANK YOU!!
Imho the best video of your series. Thanks for making this. Much appreciated.
That's powerful! Thank you I appreciate the feedback
All those zombies trying to pass each other was very satisfying to see
Some of the visualizations were pretty cool. I reran a lot of them multiple times just for fun
Thank you so much! This is exactly what I was looking for.
I just discovered your channel. You make very nice videos. I can find everything I need specifically. You are amazing and very sincere.
Thank you so much! This was the only thing that was bothering me! My player pushed the enemy before killing it, but now I could solve it. Good luck in the future!
That's great to hear!
Very good video, loved the detailled options and visualisation, it made things so clear, thank you !
Thanks! I'm really glad it helped!
OH MY GOD WHY DOES IT HAVE LESS THAN 10K VIEWS, SOMEBODY EXPLAIN PLZ
Great tutorial ! Thank you very much I think I will binge watch the whole serie right now, and you got a new subscriber ;)
Yeah it’s weird
Will have a look at this tomorrow :D thanks for making this!
Greetings from Reddit ;)
Liked and subscribed!
Thanks for interesting content!
Thank you 🤗
Waou, this is very high quality content !
Thank you 🤗
thank you so much! Your lessons are very helpful!
You're welcome! I learned a lot on this one myself!
Great channel, by the way, helped me a lot, thanks!
This is perfect. Now I don’t need to program all this!
The Navigation system is pretty powerful. Not perfect, but does cover a lot of use cases out of the box!
This is excellent work.
Thank you very much 🙏!
Omg this is the coolest video ever!!!
Thanks! 🙏
Awesome!
thanks for this!
Thanks
You're welcome!
Awesome
Top video! How does obstacle avoidance impact performance (FPS) for each quality options?
On my machine the performance was not significantly different, but you can download the full project on github and deploy to your target device(s) and see how it is on your target hardware!
@@LlamAcademy Great, thanks!
Thank you.
You’re welcome 🙌
Why stopped agent with 30 priority is not avoided by agent with priority set to 40? The 40 agent is just not moving when it gets close to 30 agent...
You should have shown how the code works and how to call those agent variables.
How is the performance on mobile?
In my game I have over 100 active agents with avoidance on "low" and it runs very fast. I'm GPU bottlenecked all of the time.
@@LlamAcademy How is performance on mobile with higher avoidance types such as "good" or "high" quality?
NavMeshSurface is the answer: we can setup more voxels for narrow places, and only for that place
Yup! Towards the end that's touched upon
Hey how did you get the data about the avoidance cells that turn white and red?
Also the one where which 8 agents its currently avoiding ?
I wasn't to find it in your github project.
Great question! That's the built-in debug visualization. If you keep open the "Navigation" window (Window > AI > Navigation), ensure the NavMeshAgent component is not collapsed on the GameObject, and select the NavMeshAgent you should see those controls in the Scene View. There will also be some options at the bottom right of the Scene View to enable different aspects of the debug visualizations.
Problem I always have with Navmesh agents avoidance is that it simply does not work if an agent is stopped in front of other agent, they start pushing each other.
To circunvent it I use the Agent/Obstacle swap method, but it makes everything so much more complicated...
I tried AStar Pathfinding instead of Unity Navmesh, same problem...
Is there any other way to make it work?
I mean, if both agents are moving, RVO works ok, they avoid each other, specially if they are moving against each other, but if the agent in front stop, the one moving behind will simply push it out of its way, as if it suddenly became invisible.
Hmm... As long as the agents have the same priority they should also consider stopped agents. I have tried this many times successfully that agents route around a stopped agent as long as there are not more than 8 nearby to consider. Can you validate your configuration of the agents?
@@LlamAcademy I tried that for months, got really sick of seeing them pushing each other, then I used the obstacle trick...
Even when the stopped agent had 0 as priority and the one moving 99,simply push each other...
I tried it with different combinations too
Tried the Astar pathfinding, the paid version, same results
Once an agent is stopped, the others simply push it
Por, perhaps they are pushed WHILE STOPPING, it could be just that, anyway doesn't work...
This doesn't work if you want your enemies (the nav agents) to just be different instances of the same prefab, as enabled is a extern variable. So when you disable one agent you end up disabling them all.
I’m not sure I’m following you. Can you elaborate?
Could you please share the link to RVO2 website you mentioned?
Absolutely! I've added it to the description as well:
RVO Websites
RVO2: gamma.cs.unc.edu/RVO2/
RVO: gamma.cs.unc.edu/RVO/
@@LlamAcademy THANKS!
Are you using the included nav mesh, or the new nav mesh surface? I can't find the avoidance prediction time on nav mesh surface.
The vast majority of these configurations are on the NavMeshAgent. Only towards the end when I go over the advanced bake settings are we dealing with the NavMeshSurface component
@@LlamAcademy oh I found it. It's just a static property on NavMesh.
I must not be fully awake. I missed the specific property you were asking about! 😅 I’m glad you found it!
How would I use this system with custom movement system for navmesh? Is it possible?
Hi! Yes you can do custom movement on the NavMesh. You can call SetDestination to calculate the path to a given location, or use NavMeshAgent.CalculatePath() to get a NavMeshPath that represents how to get from point A to point B. You can then write your own logic to walk around on the NavMesh with fully custom code, or using NavMeshAgent.Move().
Depending on your use case, it may be better to use A* and something like RVO2 agent than to try to monkey with the NavMesh APIs and doing custom movement.
I saw the other comment on this but I still can't see the obstacle avoidance visualizer. Is there something I am missing to get it to show?
You need the Navigation window open and to have the NavMeshAgent selected to have that show up
@@LlamAcademy hmmm... I did that and it wasn't showing. It's not important I just wanted to see it.
@@LlamAcademy Actually I'm not sure what I did but I did get the option to show up in the corner. Thanks
Hello! We have bugs with navmesh agents a lot colliding each other, how to fix it?
That's what this video addresses 🙂
@@LlamAcademy ahaha, sorry explanation was bad, that looks not like colliding but entering each other when target movement position for them all is the same
NavMesh.avoidancePredictionTime = avoidancePredictionTime; // make it lesser and bugfixed a little
to 4to nado
Bro your AI tutorials are best but bro please stop doing this "You-Yes You" part it sounds too cringe I am literally having goosebumps right now out of this cringe .
L take, it lit fr
I like your videos ,but please stop with this" I'm here to help you, yes you", I always hesitate to click on your vid because of this intro. It's so much cringe my brain stops working. Please 🙏🙏🙏
🤔 hmm that's my favorite part of every video
Lol
In short - Unity NavMesh is shit. What's new?
Sorry, that's not at all the takeaway from this video. Is there room for improvement? Sure. Is it terrible? Absolutely not.
Nowhere in this video does it say how you tweak these things. Avoidance time etc need to be explained how it is set in Unity instead of just theoretical how it works.
Hi 👋. Sorry you didn't find that to be clear. Since this is a little more advanced tutorial I assumed you already knew where the configurations were done. Here are the relevant documentation links, I will also update the description to include those:
Most of the configurations are on the NavMeshAgent itself: docs.unity3d.com/Manual/class-NavMeshAgent.html
The higher level configurations such as the pathfindingIterationsPerFrame can be set at the NavMesh class: docs.unity3d.com/ScriptReference/AI.NavMesh.html
And towards the end when talking about the surface configurations, those are on the NavMeshSurface component: docs.unity3d.com/Packages/com.unity.ai.navigation@1.0/manual/NavMeshSurface.html