Things u forgot to mention. Adding waypoints ( just use empty object and place where u want, if u r getting out of bound error). Baking, before backing go to right tab, object, select Navigation static, now bake will work.
@youme24602 жыл бұрын
how would you make the enemy ignore you if you are behind it?
@DP-ly3zx2 жыл бұрын
you are the man, thanks a lot!
@anshulsingh83262 жыл бұрын
@@youme2460 Just adjust the angle.
@davidsajt40 Жыл бұрын
you're a fucking god, thank you
@aciid7968 Жыл бұрын
do u have to do anything to the empty gameobject or just place it down where u want it?
@thegamingcentre42883 жыл бұрын
I was not able to find this thing anywhere from last like 4 hours, but just gave a simple yet the best tut out here
@drr18672 жыл бұрын
There are loads of tutorials like this - AI cylinders moving around the place. What nobody seems to do is use an animated avatar and show how to use blend trees to control movement and speed for patrolling, chasing and attacking. Anyone know of this I would be grateful.
@wood7465 Жыл бұрын
Did you find something ?
@indiestudio23 Жыл бұрын
just add a public animator component in the script and add few bools to the enemy like , walk , chase , attack etc.... and use animator.setbool function in the states of walk,attack and chase. then it will work
@tkc4032 жыл бұрын
If anyone is having problems with the enemy colliding with the player & it's causing it to drift off by itself. Then you need to set the enemy rigidbody to kinematic 👍 Alternatively, if you don't want your enemy kinematic all the time, add this to your chasing state: (First add a reference to your enemy rigidbody) If(vector3.distance(transform.position, gameobject.findgameobjectwithtag("player").transform.position)
@nickvuono24222 жыл бұрын
That will work here. One thing you will eventually want to learn to do is setup the collision layer masks so that certain objects don't collide with your player. The same principles are used in 2d layer collisions like in this tutorial: kzbin.info/www/bejne/l4XRf52bbs9mpZY
@yours_indie_game_dev Жыл бұрын
i think you can also just constrict the position n rotation, its much better
@BobTheBuilder294 Жыл бұрын
I had some trouble applying the BAKE because he never said to set the cube to static in the navigation object menu.
@we12man8 ай бұрын
for those who had the same problem: select the ground (or tile) >Navigation > Object > Navigation Static [V] > Navigation Area [Walkable] > Bake > {Bake button}
@santimen2000 Жыл бұрын
Hey man, everything worked but the enemy is not going back to the patrol waypoints after seeing the player, am i missing something?
@flemi4697 ай бұрын
on pastebin code is missing!
@simonesansoni30262 жыл бұрын
Isn't there an error at 3:58 that you never fix?
@griddy_shorts6382 жыл бұрын
Ikr
@francoisbaron45473 жыл бұрын
Hi. Thanks for the tutorial. That is very helpfull. The "CaughtPlayer()" methode is never used. Is that right ?
@Ryan41707 Жыл бұрын
If it's not working for you. He got a some of it incorrect. Some void updates are private. Check the copy-pasted version. There should be a: m_Player is near: on line 40 :/
@Z.R.M24-257 ай бұрын
I keep on getting errors saying “expected” or “invalid term ‘’” and “Type or namespace definition, or end of life expected” how do I fix this?
@drnovetti93922 жыл бұрын
how do i implement for enemies to stop at certain distance from player and start shooting projectiles. Thanks for the really good tutorial though
@michaelgeorge45242 жыл бұрын
sorry to both but if you found anything that answered this question, please send it my way
@themattempire42 Жыл бұрын
So I got it 'mostly' working. After I added some waypoint gameobjects to the waypoint array (which I think was missed in the video?), the guard would walk to the first one, but not the second one. Is anyone else having this issue as well? I did note a script below making sure that the nextpoint loops back to the first one, but this doesn't seem to be the problem in regards to getting to the second waypoint...
@svedalawoodcrafts Жыл бұрын
I got the same issue. Enemy will go to the 1st waypoint in the list and just stand there.
@techorigin5850 Жыл бұрын
Yeah mee to, how did you fix it
@themattempire42 Жыл бұрын
@@techorigin5850 Was months ago so I forget sorry, can't even remember if I did manage to fix it!
@drakenforge37982 жыл бұрын
I'm confused about when (m_playerNear) is true. its set to false on start function so when is it actually set to true.
@yagizdincel2 жыл бұрын
hi i made everything its almost work fine but agent doeasnt go to the patrol points and when ı got out his range it says "object reference not set to an instance of an object" how to fix it did everything right
@moonc7512 Жыл бұрын
The people who are using this Don't forget to give a tag "Player" to your player controller and Great video!
@lawlessofarabia Жыл бұрын
I tried this but for some reason the AI will still follow the Waypoints and ignore me :((
@nickw69692 жыл бұрын
I'm getting very confused on 5:35 I made the layers but have no idea what to do. My enemy capsule is just rolling around like a normal rigid body. For my player I used unitys first person template and renamed the player capsule to Player. I know I've done something wrong or missed something important.
@V0rtex662 жыл бұрын
my character stops at the first point, I did everything as shown in the video. Has anyone had a similar problem?
@shang_psycho74142 жыл бұрын
Same.
@GoddessOfSpring3 жыл бұрын
I got you for that 50th subscriber! :3 Thanks for the super easy to follow tutorial and i'll be using this into my game!
@DanCSS3 жыл бұрын
Thank you
@jacobmarshall3792 жыл бұрын
I have 2 issues, the enemy moves through my obstacles when it patrols but once it starts following me it starts having collision with them, also once it follows me and i break line of sight it never goes back to patroling, any suggestions?
@Bendyliam18 Жыл бұрын
Can you please make a tutorial on how to make it animated please
@someonenamedegg184411 ай бұрын
I have problem, every time I get out of the enemys "chase" stage, the game stops and says "object refrence was not set to an instance of an object. guess the enemy gets mad when he cant see me
@wwinnicki92302 жыл бұрын
um, when i get out of sight for the ai and it's supposed to go patroll from the first waypoint it just walks in place(i added an animation) and doesn't go to the waypoint until it sees me agaun. please help
@by_Leo0372 жыл бұрын
I copy and pasted my code in, and everything was working fine, but there was always an error saying that the index out of bounds of the array. Also my 3d model that I had attached the AI too wasn't following or moving or anything. I followed the tutorial exactly, with doing the baking and everything, and the model will move, but only if I push it with my character. It won't follow me or patrol.
@DanCSS2 жыл бұрын
Are you sure that you copied the inspector that I have?
@by_Leo0372 жыл бұрын
@@DanCSS I wasn't baking/static the floor correctly. I have multiple platforms to form the shape of my floor, so I needed to bake them all. It is fixed, and the code works perfectly! The only thing is that the index error still pops up, though it doesn't affect the code. Also unity is being buggy and my POV controls froze, but I just restarted. In general, is there a reason certain aspects of your game will stop working when others are put in?
@by_Leo0372 жыл бұрын
@@DanCSS Also I subbed, because your content is great!
@DanCSS2 жыл бұрын
@@by_Leo037 thank you man, that really means a lot!
@DanCSS2 жыл бұрын
@@by_Leo037 Sometimes Unity just needs a restart. There is sometimes bugs in the console but you can play and everything works out, so a restart once in a while does help.
@JCWeller Жыл бұрын
Doesnt work, I did everything the video told me and the enemy doesnt move. You probably shouldn't speed through teaching AI since its a complex thing.
@Ekmnstein5 ай бұрын
Mad because bad
@kirillvpgames49322 жыл бұрын
I almost always have an enemy stuck in a corner and run in place if the player turns around the corner during the chase. He does this until he walks back or walks out of the corner. What to do?
@emirozdemir73392 жыл бұрын
Make the capsule collider smaller
@MaZyYTube2 жыл бұрын
To make more pro like you should split the parts like component based design works. Patroling, Playerfinder, MovementScript. The player finder can use unityevents like if you find target disable patrol Script if you lose target enable again. Patrol script would send next position to movement script and playerfinder as well.
@mikeYagop2 жыл бұрын
IndexOutOfRangeException: Index was outside the bounds of the array.
@sillioskari21092 жыл бұрын
same
@priestartor90652 жыл бұрын
@@sillioskari2109 You need to put in transforms in your Waypoints array
@mluthfiridho15052 жыл бұрын
Can i use this method to unity standard asset third person character?
@IapitusMcHeimer2 жыл бұрын
Hey for some reason I am getting an error that the index is outside the bounds of the array for waypoints
@priestartor90652 жыл бұрын
You need to put in transforms in your Waypoints array
@yackasone2 жыл бұрын
@@priestartor9065 Sorry to bother but can you specify how to add transforms? I don't understand the syntax. I keep trying to set Transform[] equal to an empty game object but that obviously doesn't work.
@priestartor90652 жыл бұрын
@@yackasone I think you should have the transforms array public then in the inspector drag in the GameObjects that you use for waypoints. Hope that helps
@jamesmamauag1974 Жыл бұрын
do you have the full version of tutorial i didnt follow some steps like im lost
@KBforJesusChrist2 жыл бұрын
I'm looking for videos that have the enemy ai animation snapping back when it loops i can't fix this no one is talking about it 😐
@notanegg736811 ай бұрын
so im having a problem, I copy and pasted the script but it says "Index was outside the bounds of the array" any idea what this means? (its on line 50 and line 121)
@someonenamedegg184411 ай бұрын
you might have to add waypoints
@senormgaming25312 жыл бұрын
Hey this is my first time making a game so I am a beginner at making games right now. I have downloaded the script and want to ask a question how/where should I edit the code to where when the enemy AI touches the player a event happens like game ends, game over, or something tells me that such event happen. Please and Thank you.
@DanCSS2 жыл бұрын
You would do that on the on trigger event, or the on collision event. These two are simillar but not the same. You can check unity docs for things like that. Don’t be afraid to google everything, and also watch youtube videos where people explain to you the basics like controlling the inspector, or doing small things like that. There are good beginner tutorials on unity so make sure you familliarize yourself with tags, gameobjects, rigidbodies so you know how the engine works.
@senormgaming25312 жыл бұрын
@@DanCSS Thank you for replying man, appreciated it.
@EvaLunaAlvarezCalderonАй бұрын
Why would you use White background for the code man!
@blezzeth52832 жыл бұрын
Thanks you so much, after a few hours of making mistakes I finally made it work!
@williams.n.94433 жыл бұрын
how is created the array? I've never delt with it before so now i'm a little lost, i tried Unity documents but they don't teach about this
@Wayloz2 жыл бұрын
They do: docs.unity3d.com/2020.1/Documentation/ScriptReference/Array.html
@xxlenzgamingxx40182 жыл бұрын
How can i fix that the enemy goes back to Patrolling after he loses me
@beegii7222 Жыл бұрын
it gives me this error Index Out Of Range and my enemy model is getting gone
@noxtorious29622 жыл бұрын
so how to do a function where when u are caught something will be triggered?
@frankieplayzz83829 ай бұрын
i know this is old video but does anyone know how to fix error m_Ispatrol does not exist lines 187,21
@filipurevic19692 жыл бұрын
I have been looking for a long time on a good tutorial and im happy to say that I finally found one.Really easy to follow and upgrade with my own code. THANK YOU!
@dclxviclan2 жыл бұрын
I create this tutorial, but agent go in 1 point in 4, and not deteched player, why this maybe? My player use character controller, this can be because my player haven't rigidbody?
@BornthrupiecesEntertainment2 жыл бұрын
How do you add animation the script or in turn just drop a script for US to access it you can as well tell us here
@ilhamnarendra770 Жыл бұрын
is there any way that i can loop the patrol?, mine is not looping
@aciid7968 Жыл бұрын
instead of the enemy going to me, it goes to the waypoints, and completely goes around me. does anyone have a solution?
@Dwon982 жыл бұрын
How to fix IndexOutOfRangeException: Index was outside the bounds of the array Error..Please help me :(
@xezienstudios2 жыл бұрын
What if i wanted to add a value called isHidden and when the AI is chasing the player and the isHidden value inside the player turns true the AI suddenly goes back to patrolling ?
@AquilaPebble Жыл бұрын
What does IndexOutOfRangeException: Index was outside the bounds of the array. aiController.Patrolling() mean?
@villocity5794 Жыл бұрын
Hey Ive been having the same issue. I was just wondering if you ever found out what the problem was.
@FWpapo Жыл бұрын
@@villocity5794 u have to assign patrol points.Empty gameobjects into waypoints in editor. Array is empty thats why u get this error
@tacticalmythic79452 жыл бұрын
how to I change the radius of the AI. Like if I want the AI to stop within like 1.5 radius of the player so it's not pushing the player trying to get to the center of the transform? edit: I fixed it with adding this... if (Vector3.Distance (enemy.transform.position, player.transform.position) < radiusofNearPlayer) { CaughtPlayer(); } else if(Vector3.Distance (enemy.transform.position, player.transform.position) >= radiusofNearPlayer) { playerLeftRadius(); } ,but the AI takes about 2 - 3 seconds to slow down even inside the radius of the player. The radiusofNearPlayer us just a public float so I can change values in the inspector. Any help would be great!
@DanCSS2 жыл бұрын
You can change the stopping distance on the nav mesh agent in the enemy inspector
@tacticalmythic79452 жыл бұрын
@@DanCSS wow just saw your comment lol after I came up the a different method that still took a while to register in the area like to slow down. Anyway, thanks for your help! There is one last issue... If my player hits him with my hands (I am in VR) (just a mesh with a rigidbody and mesh collider) the AI will then keep going forever in the direction I hit the AI and won't stop and start moving again. How do I solve this? Thanks, also just subbed!
@DanCSS2 жыл бұрын
@@tacticalmythic7945 you can maybe put an animation after the enemy gets hit, or maybe make some sort of cooldown. I think I googled how to do a simple cooldown when I did my project. Maybe make a method that detects if the enemy has been hit, put a cooldown and then continue.
@tacticalmythic79452 жыл бұрын
thanks. I found my own method. Now I am stuck where the player is moving away and the enemy is still attacking while moving. using nav mesh. Basically it attacks when the player is at the stopping distance (when its still). I then have the player move, but the animation attacking is still playing and moving. Instead of waiting for the animation to finish, then start movin again.
@tkc4032 жыл бұрын
If anyone else is struggling with this, alternatively you can make the enemy kinematic when it gets close to the player to avoid the collision causing it to glitch out
@johnharryduavis34142 жыл бұрын
can you make a guide on how to add animation with this AI Script
@lexvangastel32852 жыл бұрын
I got a error because of the waypoints. It says IndexOutOfRangeExpection: Index was outside the bounds of the array. Can anyone help
@KSHIVA-ud6lq2 жыл бұрын
Add object anywhere Set the objects as waypoint in ai script
@KineticProduction2 жыл бұрын
Is there any way to make clone of enemy ? With singal AI script, also hit sound damage sound and AI sounds
@shang_psycho74142 жыл бұрын
I got an error. "The name "player" does not exist in the current context." It's in Void Environment View. The guy making it got an error, but it doesn't show us him fixing it! Edit: I found the script in the description and it works.
@VIKHR9x392 жыл бұрын
you see the } above it move it below the if statement
@shang_psycho74142 жыл бұрын
@@VIKHR9x39 Edit: I found out earlier that he made a pastebin script which fixed the error.
@damarfikrihaikal68292 жыл бұрын
do you know why its out of bound? i dont know how to adding waypoit
@dawoodamir7gaming1092 жыл бұрын
can you show us a script of the animations please?
@DanCSS2 жыл бұрын
I will try to make that video soon since a lot of people are interested in it.
@dak5327 Жыл бұрын
Does anyone else have the problem of the AI shaking once it touches an object with the layers "Obstacle" or "Player"? For me it just shakes and stands there without returning to the waypoint. Wondering if anyone has a fix for this, thanks!
@felixljung16628 ай бұрын
Rigidbody -> is Kinematic -> True
@samisalama30332 жыл бұрын
great tutorial, but what do i have to put on the waypoints array?
@lehmus43082 жыл бұрын
I have the same problem.
@emptybruh2 жыл бұрын
@@lehmus4308 Anything you want, a gameobject, gizmo, prefab..
@aciid7968 Жыл бұрын
how do i fix out of bounds of the array error
@gokayiseri4462 жыл бұрын
It doesn't work how many times I try. It gives index error.
@imDIEGOOyt2 жыл бұрын
My AI just go to the first checkpoint and don't go to the next one, it just go back and forth in the same checkpoint. I copy pasted the script. Anyone knows how to fix it?
@clotton24812 жыл бұрын
Thank you so much for this awsome tutorial!!
@hiroshin17602 жыл бұрын
can anyone explain where i put the AIControler script at? im using it to Enemy but seems like i make a mistake at it, so maybe can anyone tell me how to use it, please?
@MarvelousMemerMan2 ай бұрын
if this works for anyone, please give me the script because i have an error in mine that I can't find and I dont have the time to redo the entire thing, i just need you to copy and paste the script in the replys or something like that and if you did it would make my day, week, and possibly month because i have tried so many different videos and nothing works, while this is such a huge part of my game, please help me!!! (i would just copy from the paste bin link but the forum has been deleted) my error: the name 'player' does not exist in the current context
@dariusdavid75552 жыл бұрын
how do i make the terrain walkable in 2d orthographic view
@Sponge22122 жыл бұрын
Does this work for 2D?
@lordmaximus73932 жыл бұрын
Hopefully you see this! I love the script but my one issue is that my obstacles all disappear in game view and i can not understand why, if you could help that would be awesome!
@Litto_0372 жыл бұрын
Can i get some help getting this ai to work it wont go to the way points or chase the player it is literally driving me mad
@we12man8 ай бұрын
I had a problem with this script having my 'monster' stuck at players last position, never returning to the waypoint patrolling. That is the solution I just found after diving into the script and having many prints trying to identify what the problem was. It solved the problem but it depends on the player being away from the ViewRadius for the m_waitTime amount: at environment () if (Vector3.Distance (transform.position, player.position) > viewRadius) { //print ("EnviromentView = Vector3.Distance (transform.position, player.position) > viewRadius"); m_PlayerInRange = false; m_PlayerPosition = Vector3.zero; // this zero player last seen position navMeshAgent.SetDestination (waypoints [m_CurrentWaypointIndex].position); //forces AI to return to waypoint patrolling I will comment after this one if I find any other better solution. But, It will at least force your AI to return to patrol if player is away from the view radius, which I believe might serve most of the purposes.
@janajames9922 жыл бұрын
I tried but it was too hard and it wouldn’t work
@chilla1242 жыл бұрын
Hey Dan, I have been able to implement your code into my game but I am noticing there is no actual attack code within it. Would you be able to create a short video how to add attack code to the script so my enemy ai is able to attack in melee range? Thanks again for the quick and clear video, you definitely earned a sub!
@DanCSS2 жыл бұрын
There is a video on my channel called how to make combo attack which connects to this
@simplesolnforusualignorede6232 Жыл бұрын
Ahh understood have to add the elements to the wayPoints
@DadoEsko Жыл бұрын
how to set waypoints loop ?
@DaV1nk3 жыл бұрын
Great tutorial man! Thank you!
@BradExplains2 жыл бұрын
Hey, I dropped a message in your discord. Unfortunately I've been having some issues with getting this working. It looks like the GetComponent for the NavMesh is being reset each time. Not sure if this is due to an update in how Unity operates now
@MrPlazma2 жыл бұрын
Thank you so much bro, it helped me a lot. I can build on this code to make my own monster enemy in my horror game. Thanks :D
@coldspine3697 Жыл бұрын
"Couple of bools...."
@ilypavan Жыл бұрын
Do you know who's Joe?
@boyar3033 Жыл бұрын
Does anyone have an idea about the waypoints ? Do I need to manually add them ?
@botcomborderreaching35182 жыл бұрын
Good tutorial. But what if you play with friends and everybody are in AI view?
@netofranc3 жыл бұрын
My enemy is stopping on the Fourth waypoint... And i don't know why.
@DanCSS3 жыл бұрын
Make sure you check the code again, maybe you missed something?
@netofranc3 жыл бұрын
@@DanCSS sorry man, i literally Just copy and paste your code from pastebin. I didn't make any changes
@netofranc3 жыл бұрын
@@DanCSS but I'll see what i can do
@DaV1nk3 жыл бұрын
I found the issue! In the NextPoint function it's only set to continually go the next point in the list, not to loop. I'm not the best programmer so the code might be super messy but here's how I fixed the issue. (Side note 5 is just the number I had for testing, set it to 1 greater than the last point in your list, then add 1 extra point and it should start looping) public void NextPoint() { if(m_CurrentWaypointIndex >= 5) { m_CurrentWaypointIndex = 0; } else { m_CurrentWaypointIndex = (m_CurrentWaypointIndex + 1) % waypoints.Length; navMeshAgent.SetDestination(waypoints[m_CurrentWaypointIndex].position); } }
@DanCSS3 жыл бұрын
@@DaV1nk Thanks for the fix!
@xrono60032 жыл бұрын
Hi, instead of chasing me, the enemy runs away from me?! please help
@DanCSS2 жыл бұрын
Make sure you got all of the code copied correctly
@xrono60032 жыл бұрын
@@DanCSS i did, i copied it from your website. And it didnt show any errors. Di you do something in the video that wasnt in the code to copy
@DanCSS2 жыл бұрын
@@xrono6003 I didn't, but if you have problems you can download the entire script on the discord. Maybe that will help.
@azaindaboss93842 жыл бұрын
yay im the 200th subscriber
@DanCSS2 жыл бұрын
Thankss!!
@flemi4697 ай бұрын
My AI sees me through my back!
@retrovoorhees81602 жыл бұрын
Nice video! My only question is that if I could somehow add the CaughtPlayer() function to the script like, if the enemy is close to the player then call the CaughPlayer function, thanks!
@jakubkozelka82382 жыл бұрын
Hi, sorry, probably late answer. I am still new into coding, just had an idea to maybe do it through collider? So when enemy enters collider (around player), then freeze all movement for player and enemy? But that's probably really basic, you want something more complex I guess.
@retrovoorhees81602 жыл бұрын
Thanks for the idea but the player wouldn’t be able to go close to things, I already solved the problem, what I did was change the “Stop Distance” (I think thts what it’s called) to 20 so he stops 20 units away from the player, you can set this number to whatever you want and he will stop at that distance Thank you for answering! :)
@jakubkozelka82382 жыл бұрын
@@retrovoorhees8160 No problem, glad you figured it out. :)
@KSHIVA-ud6lq2 жыл бұрын
@@retrovoorhees8160 can you please mention in code where did you changed
@alfonzo12 жыл бұрын
my ai keeps turning to face the floor instead of being upright
@NRWPmusic2 жыл бұрын
Great tutorial!! Thank you so much!!
@AnotherDumbAnimater5 ай бұрын
where the hell is nav mesh agent
@benediktasstundzia30222 жыл бұрын
Why isnt there NavMeshAgent on my screen?
@DanCSS2 жыл бұрын
You have to add it as a component
@causticlasagne54972 жыл бұрын
You earned it with this one! +1 sub.
@adrialara97473 жыл бұрын
but you dont show how ti implement bools with animations bro
@DanCSS3 жыл бұрын
I can put a script with my animations and you can see how it would work if that helps?
@adrialara97473 жыл бұрын
@@DanCSS yes please that would be awesome
@tacticalmythic79452 жыл бұрын
@Music KZbin hey if you want I already did it! If you want I might be able to help you :)
@DanCSS2 жыл бұрын
@Music KZbin I added it to the discord!
@tacticalmythic79452 жыл бұрын
@Music KZbin sure what’s ur discord name?
@nightcrow578 Жыл бұрын
please help me, i used your code, its running but i got a error it says "index out of range exception unity", what should i do?
@someonenamedegg184411 ай бұрын
fixed it yet? if you didnt, the solution is to add empty game objects as waypoints, put them around in your floor, and go to the script inside the enemy, on the bottom of the script tag, there should be "Waypoints" open it, add a few, and implement the empty game objects into the things
@Ananas7868 Жыл бұрын
where tf did you find the AI in window?
@thepurplelight17175 ай бұрын
You download the AI Navigation package but the version he's showing is outdated so you might need another tutorial, this video is really weird :/
@thepurplelight17175 ай бұрын
"Tutorial in less than 8 minutes" cause you sped it up 10x 😭
@ВадимИванов-э5у2 жыл бұрын
I would like to see character mouse look script and walking.
@GodpostalRemik2 жыл бұрын
How do I make a attack pls
@DanCSS2 жыл бұрын
I made a seperate video on combo attacks
@GodpostalRemik2 жыл бұрын
@@DanCSS Tq bro my AI spin around can I fix this issue
@cepfathir78293 жыл бұрын
Hi bro, can you add a animation?
@DanCSS3 жыл бұрын
I can put a script with my animations and you can see how it would work if that helps?
@barbarabc53 жыл бұрын
@@DanCSS I would like to see this too, where can I view this animation script? Thank you :)
@asti88362 жыл бұрын
@@DanCSS can you reset the animation script to your group in discord? that would be very cool!
@DanCSS2 жыл бұрын
I added the animation script on the discord with some explanation, if you have any more questions you can ask me to make another video on it!
@DanCSS2 жыл бұрын
@@barbarabc5 I added it to the discord!
@dark_teddy2 жыл бұрын
hey how to add the waypoints?
@chilla1242 жыл бұрын
Create empty game objects and call it a waypoint, then place those where you want your enemy to patrol. After that just assign those waypoints to the waypoint list in the inspector component of the script.
@blezzeth52832 жыл бұрын
@@chilla124 thats cool and all, I dont get errors anymore, but the enemy stays like a tree if I don't go next to it to start a chase sequence
@character726 Жыл бұрын
Pleease help,how do you add navmesh to unity i down fucking understand.
@MatheusOliveira-fu8rs2 жыл бұрын
The enemy justo don't follow and pattrol, and i copy exactly the code of the video
@benavkahlo76463 жыл бұрын
hello, you can do a long tutorial video ... but please correct. I typed everything and without any errors. but it doesn't work. I think this is only made for your game and not for fps. thanks
@tacticalmythic79452 жыл бұрын
wtf u talking about? his tutorial works fine and I am doing it for VR? You clearly don't know what u are doing
@Nemko772 жыл бұрын
I'm use in it an fps as well. What he didn't show is setting the things in the inscepctor menu. Add the player and obstacle masks - unti this point he show it, and create two(or more) object for patrol waypoints and add them as waypoints. The only issue what I have right now is my enemy don't stop the running animations when reach the player.