This is the best patrol ai tutorial i found. Easy, simple, straightforward instructions. Very good for beginners and easy to do more based on this script.
Oh my god man, my teaher tried to explain it to us during 30 minutes and anybody got when you made that in 5 minutes! You are soooo gooood, thanks god that found your video! Defenitely like!!!
You should always use a timer so that if your agent can't reach a waypoint it doesn't get stuck. If the timer gets to zero, you select a random waypoint as the new target.
is there anyway to make it where if the player is a certain distance from the enemy, the enemy starts following the player until the player reaches a certain distance away from the enemy?
I had the same problem. For me the issue was that the "collider" for the NavMeshAgent was too far up on the Y-axis. Changing the offset on the NavMeshAgent (or changing the minimum distance in Update) helped.
anyone know how to make the ai stop for about 5 sec at each waypoint? im just having trouble knowing where to tell it to set the move speed to 0 for a few sec
When you use navmesh on a single plane it bakes it perfectly but when you use it on a level made out of numerous separate objects, it doesn't work so well. The solution i found for this is to place a plane to the places like a corridor where the navmesh agent couldn't bake the navmesh. Is there a better solution for this ? Btw is navmesh the only technique for the enemy AI in Unity and other APIs like UE use the same technique as well? Also thx for the great video, it helped me a lot in my project and for my learning experience in Unity
Finally a video talking about waypoints! Thank you so much!
This is the best patrol ai tutorial i found. Easy, simple, straightforward instructions. Very good for beginners and easy to do more based on this script.
Perfect, Simple, straight forward, quick to set up. Perfect for prototyping.
Oh heck, your so calm and to the point. Thats really refreshing :) Thank you!!
Oh my god man, my teaher tried to explain it to us during 30 minutes and anybody got when you made that in 5 minutes!
You are soooo gooood, thanks god that found your video!
Defenitely like!!!
You should always use a timer so that if your agent can't reach a waypoint it doesn't get stuck. If the timer gets to zero, you select a random waypoint as the new target.
voice so smooth
Soothing voice
thanks mate
Amazing tutorial got my enemy characters walking in my scene!! now onto learning how to get them chasing and attacking 😉
Thank you a lot! straight to the point and very clear explanation!
Good and simple video I hope I learn other tips from you .
Thanks! Easy to follow and short tutorial.
Thank you man. It is very simple and easy solution.
thank you, it worked flawlessly!
It works really good. thank you so much
is there anyway to make it where if the player is a certain distance from the enemy, the enemy starts following the player until the player reaches a certain distance away from the enemy?
my character stops at the first point, although he did the same as in the video
I had the same problem. For me the issue was that the "collider" for the NavMeshAgent was too far up on the Y-axis. Changing the offset on the NavMeshAgent (or changing the minimum distance in Update) helped.
@@davidnilsson2198 this didn't help. do you know any other way to fix this?
change Stopping Distance in Nav mesh Component equal 0
Have you found a solution?
@@Keuneollie yes, NewErR has already written above how to fix it
dosent work for me, stops at the first waypoint. I see several people have the same problem but no definitive solution
very helpful !
very cool !
very thanks !
this is very helpful thanks for the tutorial
anyone know how to make the ai stop for about 5 sec at each waypoint? im just having trouble knowing where to tell it to set the move speed to 0 for a few sec
Thanjs my friend clear and easy
My enemy object is moving but it went through the wall
Thank you very much...!
When you use navmesh on a single plane it bakes it perfectly but when you use it on a level made out of numerous separate objects, it doesn't work so well. The solution i found for this is to place a plane to the places like a corridor where the navmesh agent couldn't bake the navmesh. Is there a better solution for this ? Btw is navmesh the only technique for the enemy AI in Unity and other APIs like UE use the same technique as well? Also thx for the great video, it helped me a lot in my project and for my learning experience in Unity
How I can Implementating this to enemy chomper in 3d GameKit? is to hard put a patroll script in this enemy?
Thank you
Thanks for sharing this tutorial. Let say I use generic type of animal as the enemy. Can the animal move with it animation movement?
if anyone sees this, I have been trying this for hours and every time i try, the enemy will only go to the first waypoint.
Can someone please help me
Same here, I have no idea why. For some reason the index is not incremented
Have you found a solution?
@@Keuneollie well i did but my computer got blue screened and all my progress was gone.
wtf did you do to your PC
@@obisvanainobis9950 I think it was a virus but idk 🤷♂️
Ur the best, Thanks!!!!
whre can i dnwload this file
Way points seem super inefficient especially for open worlds and sandboxes
I've used this code for my enemy, but how do i then give him a walk animation instead of sliding?
just set "ur_walk_anim_name" as default and change it when enemy will shoot/hit/run etc. hope it'll work if you didn't figured it out!
Cool
idk why it's not working and i dont have error :)^:) ): :) :)
You need to call the method UpdateDestination() in the start
@@jonatassantosdasilva6495 That worked for me, thanks!
@@jonatassantosdasilva6495 This worked for me as well, thank you so much!
thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks thanks
please make video while developing the game
im getting a AI' does not exist in the namespace`UnityEngine. Im new to unity and failing to understand what i find when i google it. Any tips here?
I got it working, Was a simple coding error lol. Thanks for the video iv followed.
please, full script to download????
same
@@pixofobico marlom! i founded a easyer tutorial, that does the same thing !!! if you want, i will pass the link!!
@@pimpoplays I want it
@@pixofobico ua-cam.com/video/UvDqnbjEEak/v-deo.html here, or just search How to make an enemy follow player - Unity NavMesh
@@pixofobico i know is Enemy follow but you can use for other things!!!
this way has a bug dont test
First.