One question I expect may come up (because that's what I tried to do in the first place and it doesn't work ;)) but I didn't add a section in the video for: Q: Why not just create a NavMeshPath with the smoothed corners and do NavMeshAgent.SetPath(smoothedPath) A: You cannot modify the corners property of the NavMeshPath. The NavMeshPath must be calculated by the Navigation System itself. All properties are read only: docs.unity3d.com/ScriptReference/AI.NavMeshPath.html
This is like the llama version of infinity war. The culmination of several other story threads being woven together into a single epic tapestry. Click to move, all these nav mesh videos, bezier curves all spun together to make this one. Nicely done.
@@LlamAcademy Been working on my channel too so I know how much work you have put in to this. Looks great. One question. Do you do all of the video graphics and animations yourself? if so what software do you use? it looks great and way better than what I have been doing with Vegas so far but my video editing skills lack a lot.
Yeah I do all the recording and editing myself. I was using HitFilm express up until 2 videos ago. Recently swapped to DaVinci Resolve because HitFilm would crash on my laptop so if I wasn't home it was a real pain to put the video together on time. Personally I find HitFilm easier to work with but that may just be because I'm still new to DaVinci. It just takes time and practice. I know you'll improve over time just like I have!
Thanks for this and all you other videos. Very informative. In my game, CalculatePath always returns false for me and I'm using the all areas area mask. If I call Set Destination on my character object, with the same target position, it happily goes to that position. Any idea why CalculatePath fails? Update: I've worked out what the issue was. The NPC tries to calculate the path when the game starts. The player drops from a height, into the map, so when the game starts they're not on the player isn't on the Mesh so it can't do it. However SetDestination works so I'm guessing that finds the nearest point on the Mesh behind the scenes. Another thing I've found is that this code (which I appreciate you're teaching the principal behind it) is that it doesn't work if you have NavMeshLinks in the path. Keep up the great work 🙂
Glad you figured it out and thank you for sharing the result! I’m a little surprised the NavMeshLink didn’t work. I’ll have to look into that. I thought calculate path considered the links 🤔
2 года назад+1
That's good il add it to my project. Rly cool man :>
Why not just use a catmull rom spline over bezier? I feel like they are better suited to creating a curve that passes through points without many artifacts unlike Bezier curves.
Those are also a viable option! I haven’t covered them on the channel yet so it was easier to use a topic I could refer viewers back to and not convolute this video also explaining those.
When moving the agent with NavMeshAgent.Move it doesn't seem to use avoidance anymore. It still confines the agent to the nav mesh though. Does anyone know a way to still use avoidance and a custom path?
That is correct, using NaveMeshAgent.Move just moves the Agent along the NavMesh. If you want to consider avoidance with this, you would have to implement that yourself using something like the RVO or RVO2 algorithms (RVO is used by Agents by default, RVO2 is newer and nicer)
i struggle to find tutorial on navmeshes with different agent sizes. It always bakes navmesh to current settings, and both agents folllow same pathing :| big agent just clips through obstacles
With the NavMesh components you bake multiple NavMeshes with multiple NavMeshSurfaces based on the different agent configurations. Check out the AI Series part 1 where I cover that! ruclips.net/video/aHFSDcEQuzQ/видео.html
when i try to add the "NavMeshSurface" script onto an asset, it gives me an error that says "Can't add component "NavMeshSurface" because script class cannot be found"
For all of the AI Series videos I’m using the Nav Mesh Components: docs.unity3d.com/Packages/com.unity.ai.navigation@1.0/manual/index.html Part 1 includes how to install it and the basics: ruclips.net/video/aHFSDcEQuzQ/видео.html
One question I expect may come up (because that's what I tried to do in the first place and it doesn't work ;)) but I didn't add a section in the video for:
Q: Why not just create a NavMeshPath with the smoothed corners and do NavMeshAgent.SetPath(smoothedPath)
A: You cannot modify the corners property of the NavMeshPath. The NavMeshPath must be calculated by the Navigation System itself. All properties are read only: docs.unity3d.com/ScriptReference/AI.NavMeshPath.html
This is like the llama version of infinity war. The culmination of several other story threads being woven together into a single epic tapestry. Click to move, all these nav mesh videos, bezier curves all spun together to make this one. Nicely done.
Awesome work. I didn't even think of wondering why we can't move in a curvy path :) thank you
You're welcome! 🙌
Your channel is really coming along nicely, some great topics too.
Thanks! I appreciate that
@@LlamAcademy Been working on my channel too so I know how much work you have put in to this. Looks great. One question. Do you do all of the video graphics and animations yourself? if so what software do you use? it looks great and way better than what I have been doing with Vegas so far but my video editing skills lack a lot.
Yeah I do all the recording and editing myself. I was using HitFilm express up until 2 videos ago. Recently swapped to DaVinci Resolve because HitFilm would crash on my laptop so if I wasn't home it was a real pain to put the video together on time. Personally I find HitFilm easier to work with but that may just be because I'm still new to DaVinci.
It just takes time and practice. I know you'll improve over time just like I have!
@@LlamAcademy Awesome thanks for the info
Thanks for everything I redid whole enemy system without your series
You're welcome!
this will look perfect on human enemies. Thanks for the video.
Thanks for this and all you other videos. Very informative. In my game, CalculatePath always returns false for me and I'm using the all areas area mask. If I call Set Destination on my character object, with the same target position, it happily goes to that position. Any idea why CalculatePath fails?
Update: I've worked out what the issue was. The NPC tries to calculate the path when the game starts. The player drops from a height, into the map, so when the game starts they're not on the player isn't on the Mesh so it can't do it. However SetDestination works so I'm guessing that finds the nearest point on the Mesh behind the scenes.
Another thing I've found is that this code (which I appreciate you're teaching the principal behind it) is that it doesn't work if you have NavMeshLinks in the path.
Keep up the great work 🙂
Glad you figured it out and thank you for sharing the result!
I’m a little surprised the NavMeshLink didn’t work. I’ll have to look into that. I thought calculate path considered the links 🤔
That's good il add it to my project. Rly cool man :>
😁 awesome!
Why not just use a catmull rom spline over bezier? I feel like they are better suited to creating a curve that passes through points without many artifacts unlike Bezier curves.
Those are also a viable option! I haven’t covered them on the channel yet so it was easier to use a topic I could refer viewers back to and not convolute this video also explaining those.
When moving the agent with NavMeshAgent.Move it doesn't seem to use avoidance anymore. It still confines the agent to the nav mesh though. Does anyone know a way to still use avoidance and a custom path?
That is correct, using NaveMeshAgent.Move just moves the Agent along the NavMesh. If you want to consider avoidance with this, you would have to implement that yourself using something like the RVO or RVO2 algorithms (RVO is used by Agents by default, RVO2 is newer and nicer)
i struggle to find tutorial on navmeshes with different agent sizes. It always bakes navmesh to current settings, and both agents folllow same pathing :| big agent just clips through obstacles
With the NavMesh components you bake multiple NavMeshes with multiple NavMeshSurfaces based on the different agent configurations. Check out the AI Series part 1 where I cover that! ruclips.net/video/aHFSDcEQuzQ/видео.html
Dont get it, what is the advantage of smoothing? i see no smoothing moves well too
when i try to add the "NavMeshSurface" script onto an asset, it gives me an error that says "Can't add component "NavMeshSurface" because script class cannot be found"
For all of the AI Series videos I’m using the Nav Mesh Components: docs.unity3d.com/Packages/com.unity.ai.navigation@1.0/manual/index.html
Part 1 includes how to install it and the basics: ruclips.net/video/aHFSDcEQuzQ/видео.html
Awesome
Very good material bit i think it will be too heavy on performance
Thanks 🙏. Depending on how many agents you have, it can see it becoming expensive.
@@LlamAcademy when you run away from ai it need to update almost every frame thats problem :D