A quick tutorial on making a patrolling AI in Unity. Music: Lasers by Amsterdam
Жүктеу.....
Пікірлер: 64
@yaqingcao48172 жыл бұрын
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.
@migueldc6845 Жыл бұрын
Oh heck, your so calm and to the point. Thats really refreshing :) Thank you!!
@SassyPantsy Жыл бұрын
Perfect, Simple, straight forward, quick to set up. Perfect for prototyping.
@buriedbones-nh9xrАй бұрын
Soothing voice thanks mate
@kiaora2601 Жыл бұрын
Thank you a lot! straight to the point and very clear explanation!
@carlabalos38842 жыл бұрын
Thanks! Easy to follow and short tutorial.
@lazyhsn2 жыл бұрын
Thank you man. It is very simple and easy solution.
@rudyramadhana4127 Жыл бұрын
thank you, it worked flawlessly!
@GLXY_SHADOW Жыл бұрын
It works really good. thank you so much
@borhf2 жыл бұрын
this is very helpful thanks for the tutorial
@trailsnail Жыл бұрын
voice so smooth
@valeronbaleron8362 жыл бұрын
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!!!
@thebestcelep6358 Жыл бұрын
Good and simple video I hope I learn other tips from you .
@MoTivE-pw9hb Жыл бұрын
Amazing tutorial got my enemy characters walking in my scene!! now onto learning how to get them chasing and attacking 😉
@h2acomunicacion3 жыл бұрын
How I can Implementating this to enemy chomper in 3d GameKit? is to hard put a patroll script in this enemy?
@MaidGameStudios11 ай бұрын
very helpful ! very cool ! very thanks !
@PeterSedesse5 ай бұрын
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.
@ercuttogameplay Жыл бұрын
Thanjs my friend clear and easy
@K1ngCaden Жыл бұрын
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?
@nickfai9301 Жыл бұрын
Thanks for sharing this tutorial. Let say I use generic type of animal as the enemy. Can the animal move with it animation movement?
@pedra7272 жыл бұрын
Ur the best, Thanks!!!!
@user-os1jy5en1t Жыл бұрын
Thank you very much...!
@CarlosGonzalez-mz2tf11 ай бұрын
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
@Geckotr Жыл бұрын
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
@requiem_for_a_dream5463 Жыл бұрын
Thank you
@APRIANSYAHAV2 жыл бұрын
whre can i dnwload this file
@prabhun82 жыл бұрын
Cool
@V0rtex66 Жыл бұрын
my character stops at the first point, although he did the same as in the video
@davidnilsson2198
Жыл бұрын
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.
@Tail1704
Жыл бұрын
@@davidnilsson2198 this didn't help. do you know any other way to fix this?
@newerr497
Жыл бұрын
change Stopping Distance in Nav mesh Component equal 0
@Keuneollie
Жыл бұрын
Have you found a solution?
@V0rtex66
Жыл бұрын
@@Keuneollie yes, NewErR has already written above how to fix it
@paulojohnfernandez7380 Жыл бұрын
My enemy object is moving but it went through the wall
@obisvanainobis9950 Жыл бұрын
dosent work for me, stops at the first waypoint. I see several people have the same problem but no definitive solution
@robro4982 жыл бұрын
I've used this code for my enemy, but how do i then give him a walk animation instead of sliding?
@whoami.....
Жыл бұрын
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!
@trecheris3 жыл бұрын
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?
@trecheris
3 жыл бұрын
I got it working, Was a simple coding error lol. Thanks for the video iv followed.
@jadonstudios777 Жыл бұрын
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
@irenesanchez8793
Жыл бұрын
Same here, I have no idea why. For some reason the index is not incremented
@Keuneollie
Жыл бұрын
Have you found a solution?
@jadonstudios777
Жыл бұрын
@@Keuneollie well i did but my computer got blue screened and all my progress was gone.
@obisvanainobis9950
Жыл бұрын
wtf did you do to your PC
@jadonstudios777
Жыл бұрын
@@obisvanainobis9950 I think it was a virus but idk 🤷♂️
Пікірлер: 64
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 heck, your so calm and to the point. Thats really refreshing :) Thank you!!
Perfect, Simple, straight forward, quick to set up. Perfect for prototyping.
Soothing voice thanks mate
Thank you a lot! straight to the point and very clear explanation!
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
this is very helpful thanks for the tutorial
voice so smooth
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!!!
Good and simple video I hope I learn other tips from you .
Amazing tutorial got my enemy characters walking in my scene!! now onto learning how to get them chasing and attacking 😉
How I can Implementating this to enemy chomper in 3d GameKit? is to hard put a patroll script in this enemy?
very helpful ! very cool ! very thanks !
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.
Thanjs my friend clear and easy
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?
Thanks for sharing this tutorial. Let say I use generic type of animal as the enemy. Can the animal move with it animation movement?
Ur the best, Thanks!!!!
Thank you very much...!
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
Thank you
whre can i dnwload this file
Cool
my character stops at the first point, although he did the same as in the video
@davidnilsson2198
Жыл бұрын
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.
@Tail1704
Жыл бұрын
@@davidnilsson2198 this didn't help. do you know any other way to fix this?
@newerr497
Жыл бұрын
change Stopping Distance in Nav mesh Component equal 0
@Keuneollie
Жыл бұрын
Have you found a solution?
@V0rtex66
Жыл бұрын
@@Keuneollie yes, NewErR has already written above how to fix it
My enemy object is moving but it went through the wall
dosent work for me, stops at the first waypoint. I see several people have the same problem but no definitive solution
I've used this code for my enemy, but how do i then give him a walk animation instead of sliding?
@whoami.....
Жыл бұрын
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!
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?
@trecheris
3 жыл бұрын
I got it working, Was a simple coding error lol. Thanks for the video iv followed.
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
@irenesanchez8793
Жыл бұрын
Same here, I have no idea why. For some reason the index is not incremented
@Keuneollie
Жыл бұрын
Have you found a solution?
@jadonstudios777
Жыл бұрын
@@Keuneollie well i did but my computer got blue screened and all my progress was gone.
@obisvanainobis9950
Жыл бұрын
wtf did you do to your PC
@jadonstudios777
Жыл бұрын
@@obisvanainobis9950 I think it was a virus but idk 🤷♂️
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
Way points seem super inefficient especially for open worlds and sandboxes
please, full script to download????
@pixofobico
2 жыл бұрын
same
@pimpoplays
2 жыл бұрын
@@pixofobico marlom! i founded a easyer tutorial, that does the same thing !!! if you want, i will pass the link!!
@pixofobico
2 жыл бұрын
@@pimpoplays I want it
@pimpoplays
2 жыл бұрын
@@pixofobico kzread.info/dash/bejne/h6p409Cbmqirkc4.html here, or just search How to make an enemy follow player - Unity NavMesh
@pimpoplays
2 жыл бұрын
@@pixofobico i know is Enemy follow but you can use for other things!!!
idk why it's not working and i dont have error :)^:) ): :) :)
@jonatassantosdasilva6495
2 жыл бұрын
You need to call the method UpdateDestination() in the start
@tjorloski1961
Жыл бұрын
@@jonatassantosdasilva6495 That worked for me, thanks!
@AriShooDesigns
Жыл бұрын
@@jonatassantosdasilva6495 This worked for me as well, thank you so much!
First.
this way has a bug dont test