Dude, what you do on youtube.. teaches people for free is just too much...,I'm very grateful to you, all my skills with unity and even learning English I'm getting into these classes, thank you.
If anyone has a set destination error, follow these steps 1. Select your ground and check static on the top right corner of the inspector. 2. Keep your ground selected, and go to the Navigation tab. (Window>AI>Navigation) Then you should see a tab in Navigation called bake. Select it, and click bake on the bottom. 3. Play test your game. It might work it might not. If it doesn't work, follow the next steps. If it does, you are good to go. 4. Move your enemy ai closer to the ground. 5. Play test your game again. It might work it might not. If it doesn't work, follow the next steps. If it does, you are good to go. 6. If your enemy gets stuck in the ground, select your enemy, and in the NavMeshAgent, play around with the base offset. You should see a cylinder. Make that cylinder touch the ground.
mate you are simply the best everytime i watch a tutorial elsewhere they jugle theyre scripts between episodes so that you have to watch every of theyre episodes but you do a complete video where you explain everything regarding one topic. i love your videos :) you are the best mate keep up the good work you made my day
if anyone else had the thing that said "SetDestination can only be called on an active agent that is on a NavMesh." I set the ground as static went to window- AI- Navigation then bakedif that helps
just discovered this series now im trying to integrate the parts of these scripts with your tower defense tutorial series to make a 3d kingdom rush type of game, thank a lot for these vids. btw im so new to game development so im really grateful
Before brackeys tutorial was a little bit boring like the intro was just "today we are going to make the A.I." Bur now we have a mlittle joke in almost every intro Brackeys really changed in a good way
im getting an error: "SetDestination" can only be called on an active agent that has been placed on a NavMesh. UnityEngine.AI.NavMeshAgent:SetDestination(Vector3) EnemyController:Update() (at Assets/EnemyController.cs:25)
It's the map you use to move you're character You can locate it on you're Scene Sorry guys i'm late :o The method I gave is not universal but maybe it's work for you
I followed this tutorial to the T, same scripts exactly but the cube would not move. I took off the rigid body, and it works perfect now. Anyone with same problem , try messing with the rigid body
The type or namespace name 'CharacterCombat' could not be found (are you missing a using directive or an assembly reference?) The type or namespace name 'CharacterCombat' could not be found (are you missing a using directive or an assembly reference?) please help
Been watching these videos cause I, when I get a new computer, want to make a first person Dungeon Crawler, similar to Fromsoftware's King's Field games.
You and Sebastian help a lot. Thanks for the videos and tutorials. I do not know if they stopped creating videos, and if you still have a chance to collaborate on patreon.
Sebastians AI for the animations kinda suck bcs he didn't showed how he puted the animations to the enemy I tried it several times and it doesn't work. Like the enemy is attacking but am getting errors for the attack animation
Got it to work in VR. Add a nav mesh to you PlayerController. Add an empty gameobject to scene and put the PlayerManger script on it. Then add the PlayerController to gameobject you just made in inspector. This needs to be something that moves with you. The XRRig that is parent will be stationary so wont see you move and nav mesh is needed for enemy to see you. Lots of comments but hope mine helps someone
The type or namespace name 'Interactable' could not be found (are you missing a using directive or an assembly reference?) The type or namespace name 'Interactable' could not be found (are you missing a using directive or an assembly reference?) how can i fix it §?
Great tutorial as always! Easy to follow and really helped me out except for the fact that it doesn't work. I keep getting this error: Failed to create agent because it is not close enough to the NavMesh. Then whenever I get in range i get this error : "SetDestination" can only be called on an active agent that has been placed on a NavMesh. Anybody know what to do? I already baked the floor and stuff.
IMPORTANT For anyone having navmesh problem Just add navigation static to your terrain or ground Then go to window -->navigation -->bake and click on bake
Thanks Brackeys, your tutorial is really helpful, understand, and...free. I wish that you can make more tutorial and yeah.I like your tutorial **Hope you can get some money from your videos**. Lol
I love this series. I don't know how far you want to take it, but topics I would love to see covered are amongst others: - changing scene without losing the inventory and stats etc. - saving and loading the game (maybe even with savepoints like in some JRPGs like Final Fantasy) - trading with NPCs or maybe even have dialogue with different options or even different outcomes - a simple system to level up and customizing stats with each level up - day/night cycle or weather effects I know a lot of these things are probably covered in other videos or you could read up on those topics somewhere online etc. but it would be fun to learn these things in the context of this little RPG series :) Of course this list could be endlessly long haha there's so much you could do! Anyways, keep up the good work :)
using System.Collections; using System.Collections.Generic; using UnityEngine; public class enemy : Intractable { public override void Intract() { base.Intract(); // Attack the enemy } } what am i doing wrong
7:32 The type or namespace name 'Interactable' could not be found (are you missing a using directive or an assembly reference?), I am getting this error
Heh I needed A.I. For my game the day before yesterday and (of course) I made it. Too bad I didn't wait another couple of days to get a nice tutorial on it. At least I hope other will find it useful 😊👍
Not to sure why but my target location isnt updated after start. So the enemy will move to the initial player position but not follow the player after the player moves (or if the player is out of the lookRadius). I followed the video, any suggestions?
i keep getting this error "SetDestination" can only be called on an active agent that has been placed on a NavMesh. UnityEngine.AI.NavMeshAgent:SetDestination(Vector3) EnemyController:Update() (at Assets/EnemyController.cs:25)
You go to Window>AI>Navigation and once you have the navigation window open, click on the objects that you want to bake a NavMesh and in the bake tab click bake. Hope this helps!
Assets\scripts\Enemy.cs(5,22): error CS0246: The type or namespace name 'Interactable' could not be found (are you missing a using directive or an assembly reference?) what am i doing wrong pls answer this time
I am getting an error "Set Destination" can only be called on an active agent that has been placed on the NavMesh. UnityEngine.AI.NavMesh:SetDestination(Vector3). How to fix this and what is the mistake? Please help me.
This is from rarbg, the site is really reliable and i have never encountered a virus. rarbg2018.org/torrent/r4g5auw7tcohmp1likznf9qe638xjydbv2szs62cpbtfumdve5x8l713rkoqj9aiy4hgnw
dextrex Victor you could also just store two positions, and always have the camera at one position. This would probably prevent small lag spikes on the other guys method.
Im getting "SetDestination" can only be called on an active agent that has been placed on a NavMesh. UnityEngine.AI.NavMeshAgent:SetDestination(Vector3) enemycontroller:Update() (at Assets/enemycontroller.cs:28) please someone help
window - AI - navigation - then select the floor u have go to bake and bake it - then go to object and select the floor u baked and check navigation static and generate offmeshlinks. I was having this problem too.
It is keep saying, SetDestination" can only be called on an active agent that has been placed on a NavMesh. UnityEngine.AI.NavMeshAgent:SetDestination(Vector3)
If anyone has a set destination error, follow these steps 1. Select your ground and check static on the top right corner of the inspector. 2. Keep your ground selected, and go to the Navigation tab. (Window>AI>Navigation) Then you should see a tab in Navigation called bake. Select it, and click bake on the bottom. 3. Play test your game. It might work it might not. If it doesn't work, follow the next steps. If it does, you are good to go. 4. Move your enemy ai closer to the ground. 5. Play test your game again. It might work it might not. If it doesn't work, follow the next steps. If it does, you are good to go. 6. If your enemy gets stuck in the ground, select your enemy, and in the NavMeshAgent, play around with the base offset. You should see a cylinder. Make that cylinder touch the ground.
Dude, what you do on youtube.. teaches people for free is just too much...,I'm very grateful to you, all my skills with unity and even learning English I'm getting into these classes, thank you.
Technically it isn't free. The video is monetized by ads. So, it costs you your time.
James which is more valuable than money if you think about it
@Big Smoke PINEAPPLE ON PIZZA IS AMAZING
@@andrewnagengast2349 the pineapples on pizza part got me lol
Mds, achei um BR! Aleluia!!!
If anyone has a set destination error, follow these steps
1. Select your ground and check static on the top right corner of the inspector.
2. Keep your ground selected, and go to the Navigation tab. (Window>AI>Navigation) Then you should see a tab in Navigation called bake. Select it, and click bake on the bottom.
3. Play test your game. It might work it might not. If it doesn't work, follow the next steps. If it does, you are good to go.
4. Move your enemy ai closer to the ground.
5. Play test your game again. It might work it might not. If it doesn't work, follow the next steps. If it does, you are good to go.
6. If your enemy gets stuck in the ground, select your enemy, and in the NavMeshAgent, play around with the base offset. You should see a cylinder. Make that cylinder touch the ground.
Thanks so much lol
ya thank you
Thanks !!
Thank you so much!
thanks a lot
"if we get closer to our enemy, it will start to chase us, *AWESOME* "
"Hehe boi u have got some knowledge" - words of an old dog
My days goes awesome when he says "AWESOME!"
6 years later and this video is still doing better than most recent videos
Man, I love your videos. Especially these RPG ones 👌
After all these years I still come back to your videos..... Awesome Job my man !!! Mad Respect !!!
mate you are simply the best everytime i watch a tutorial elsewhere they jugle theyre scripts between episodes so that you have to watch every of theyre episodes but you do a complete video where you explain everything regarding one topic. i love your videos :) you are the best mate keep up the good work you made my day
if anyone else had the thing that said "SetDestination can only be called on an active agent that is on a NavMesh." I set the ground as static went to window- AI- Navigation then bakedif that helps
Man, thank you for making these tutorials! They're top notch quality and very interesting! Keep it up!
yes
Let's start to create deep-learning AI enemy.
Yeah! You know any good resources for that?
just discovered this series now im trying to integrate the parts of these scripts with your tower defense tutorial series to make a 3d kingdom rush type of game, thank a lot for these vids. btw im so new to game development so im really grateful
Why is he always Smiling?
Adarsh s because he is happy helping us
Adarsh s Lol
@@ezpz4646 yak
the sniper would be angry if he didnt
it woudnt look good if he was frowning
when you just want a simple enemy ai and then have to spend a few hours watching his entire series, only for it to break your game
lol
Love this series. It's been a great help with my current project. Keep the coming!
I like that u speak fast and dont waste our time 👊👊👊
When everyone makes half hour long ai vids but ya boi asbjørn got ai down
I can't believe how good you are at explaining!
Great info on NavMeshes... I was able to get the right information quickly and easily!! Thank you for all of your tutorials.
Before brackeys tutorial was a little bit boring like the intro was just "today we are going to make the A.I."
Bur now we have a mlittle joke in almost every intro
Brackeys really changed in a good way
Thank you so much, Brackeys! I am looking forward to the next part! :D
something to note is that if its not working, try going into the PlayerManager script and change (GameObject player) into (Transform player).
im getting an error: "SetDestination" can only be called on an active agent that has been placed on a NavMesh.
UnityEngine.AI.NavMeshAgent:SetDestination(Vector3)
EnemyController:Update() (at Assets/EnemyController.cs:25)
Bake the map again
(Map > Navigation > Bake > Bake)
Or put your Enemy more close to the map
@@Floyna thx
I’ve hit bake and nothing happened
@@Floyna where is the "map" tab??
It's the map you use to move you're character
You can locate it on you're Scene
Sorry guys i'm late :o
The method I gave is not universal but maybe it's work for you
I followed this tutorial to the T, same scripts exactly but the cube would not move. I took off the rigid body, and it works perfect now. Anyone with same problem , try messing with the rigid body
Great work Brackeys!
Who else got a little spooked when he suddenly plays the music
This is amazing bro!
MY ENEMY GOES THROUGH WAAAAALLLLLLLLLLLLLLLLLLLS
just a great tutorial overall, even though I cannot donate currently I will be sure to share your channel as much as possible
Awesome video as always. Would loooove to see this be converted to a multiplayer / coop.
If anyone just so happens to have the issue where their player wont focus on the enemy, remember to remove the boxcollider from the enemy GFX
5 years later and the community still coming through
@@hamandswizz yup!!
Thank you so much for this series! I am actually not using this series to make a RPG. Instead, I am using them, to make a MOBA-style game!
Don't forget to generate a NavMesh!!!
How you do that?
This is the only video that I've watched that you rushed without explaining much
u was the best person and u will be on our hurts.
Wow what a great channel this is. I've been subbed for sometime and coding interests me. Thanks for the awesome channel! :)
Man, I love your videos thank you
Because of you I create my first "game". Thanks you. Because of it i want to learn English.
hows english coming along?
"We would love to teach you to code a really fun way"
The type or namespace name 'CharacterCombat' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'CharacterCombat' could not be found (are you missing a using directive or an assembly reference?)
please help
Been watching these videos cause I, when I get a new computer, want to make a first person Dungeon Crawler, similar to Fromsoftware's King's Field games.
Great Work man ...............
This is great! I really love your videos!
You're really cool! I love your work. keep up :)
You and Sebastian help a lot. Thanks for the videos and tutorials. I do not know if they stopped creating videos, and if you still have a chance to collaborate on patreon.
Sebastians AI for the animations kinda suck bcs he didn't showed how he puted the animations to the enemy I tried it several times and it doesn't work. Like the enemy is attacking but am getting errors for the attack animation
Got it to work in VR. Add a nav mesh to you PlayerController. Add an empty gameobject to scene and put the PlayerManger script on it. Then add the PlayerController to gameobject you just made in inspector. This needs to be something that moves with you. The XRRig that is parent will be stationary so wont see you move and nav mesh is needed for enemy to see you. Lots of comments but hope mine helps someone
Love these videos, inspirational!
Boom! Thanks bro
u know what bros? I'm SUSCRIBING TO BRACKEYS LEZ GOOOOO! WOOO HOOOO! YAAAAAAAAA...
sadly hes not going to make vdos anymore
If any errors, set floor to static, then go to window > AI > Navigation > and hit bake
The type or namespace name 'Interactable' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'Interactable' could not be found (are you missing a using directive or an assembly reference?)
how can i fix it §?
Sorry I'm a bit late, but to anyone else who has this problem:
Make sure to watch this video first
--th-cam.com/video/9tePzyL6dgc/w-d-xo.html
i can help u if u still want it
Great tutorial as always! Easy to follow and really helped me out except for the fact that it doesn't work.
I keep getting this error: Failed to create agent because it is not close enough to the NavMesh.
Then whenever I get in range i get this error : "SetDestination" can only be called on an active agent that has been placed on a NavMesh.
Anybody know what to do? I already baked the floor and stuff.
i had this problem but when i baked the terrain it worked smoothly
Yes bro I got the same error....
Love this channel!!!
yes! this is what i was looking for!
IMPORTANT
For anyone having navmesh problem
Just add navigation static to your terrain or ground
Then go to window -->navigation -->bake and click on bake
Just add navigation static. how xD???
Thanks Brackeys, your tutorial is really helpful, understand, and...free. I wish that you can make more tutorial and yeah.I like your tutorial **Hope you can get some money from your videos**. Lol
Make a build system
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
UnityEngine.AI.NavMeshAgent:SetDestination(Vector3)
What I do?
Nevermind
I wrote agent.SetDestination(transform.position);
If somebody has same probleem then make sure it is tärget not transform
@@Tony-rt1gr thank you
Best tutorial dude, thanks
6:30 really scared me and idk why
I started scrolling the tabs to see which one is playing the audio
For some reason Unity shows an error when I try to do Enemy : Interactable...is there a way to fix the interactable error here?
same here did you find a fix?
I love this series. I don't know how far you want to take it, but topics I would love to see covered are amongst others:
- changing scene without losing the inventory and stats etc.
- saving and loading the game (maybe even with savepoints like in some JRPGs like Final Fantasy)
- trading with NPCs or maybe even have dialogue with different options or even different outcomes
- a simple system to level up and customizing stats with each level up
- day/night cycle or weather effects
I know a lot of these things are probably covered in other videos or you could read up on those topics somewhere online etc. but it would be fun to learn these things in the context of this little RPG series :)
Of course this list could be endlessly long haha there's so much you could do!
Anyways, keep up the good work :)
the dislikes are all the people who forgot to put ";" at the end of the lines of code
We need a "Making an RTS in Unity" :D
I like all of your content
👍Thank for tutorial
Man you'r the best.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class enemy : Intractable
{
public override void Intract()
{
base.Intract();
// Attack the enemy
}
}
what am i doing wrong
Intractable
?
I have the same problem
7:32 The type or namespace name 'Interactable' could not be found (are you missing a using directive or an assembly reference?), I am getting this error
Same here There is no class Named Interactable Its maybe Changed
thanks for the three lines of code 7:01, but also can used LookAt
Plot twist: It was a friend AI. He killed all his friends.
if you guys want the enemy to face direction of travel you can use 'Vector3 direction = (agent.steeringTarget - transform.position).normalized;'
Heh I needed A.I. For my game the day before yesterday and (of course) I made it. Too bad I didn't wait another couple of days to get a nice tutorial on it. At least I hope other will find it useful 😊👍
Thank you!
Not to sure why but my target location isnt updated after start. So the enemy will move to the initial player position but not follow the player after the player moves (or if the player is out of the lookRadius). I followed the video, any suggestions?
@Brackeys
How do I point to my player that I spawned at runtime? I can't use the public method player that you show in the tutorial.
how did u collapse it the code ?
Thanks for this tutorial
i keep getting this error
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
UnityEngine.AI.NavMeshAgent:SetDestination(Vector3)
EnemyController:Update() (at Assets/EnemyController.cs:25)
same
Same.. Any solutions ?
Maybe you NavMeshAgent is inactive? Or you forgot to add the component to the cube?
You go to Window>AI>Navigation and once you have the navigation window open, click on the objects that you want to bake a NavMesh and in the bake tab click bake. Hope this helps!
@@arcadeboy7503 Thannkksss
I'm going to miss his vids
If you dont search for tags, then its bad if you have more characters tho, you have to manually say it has to look for this and that player
hi , love your tuts your the best of course. we will be realy happy if you could make us tut on how to make combat ai in hard
difficulty
when I first did this I was scared seeing a t posing dummy start floating towards me
is there another place I can put the player manager beside the game manager since I only need the ai and not the entire
for me when i write OnDrawGizmosSelected it pops up a warning that the (OnDrawGizmosSelected) is declared but never used pls someone help
AWESOME
Assets\scripts\Enemy.cs(5,22): error CS0246: The type or namespace name 'Interactable' could not be found (are you missing a using directive or an assembly reference?) what am i doing wrong pls answer this time
Pry a spelling error
How do i increase the speed of the enemy?
when a player is entered into enemy destination area, the game will be going to pause.
Thank you so much,
Where is the video that makes the enemies fight? I couldnt find it
Talented.
thank you
Could you please make a new video just explaining how to make AI? I love your content!
I know but Brackeys can still come back
I am getting an error "Set Destination" can only be called on an active agent that has been placed on the NavMesh. UnityEngine.AI.NavMesh:SetDestination(Vector3). How to fix this and what is the mistake? Please help me.
Berwin Singh i have this too.
U are one of the best YT-ers i know and i mean it, keep up the great work my frend :)
BTW where did u get Photoshop from? ^^´
This is from rarbg, the site is really reliable and i have never encountered a virus.
rarbg2018.org/torrent/r4g5auw7tcohmp1likznf9qe638xjydbv2szs62cpbtfumdve5x8l713rkoqj9aiy4hgnw
I'm very new at this, so I don't know if you've answered this b4 but how do you make the enemy have an angle for line of sight
Hey!!
I'm making this game and want switch camera! Do you have any video were you show how to do that? Great videos, keep it up!!
Just have a reference to both cameras, and simply enable & disable them as needed.
dextrex Victor you could also just store two positions, and always have the camera at one position. This would probably prevent small lag spikes on the other guys method.
Store 2 empty gameObject and use transform.Translate. You can also use camera.LookAt with the right range.
Use Vector3.lerp() instead of transform.Translate().
Yes! That's a good idea ^^.
can only be called on an active agent that has been placed on a NavMesh.
this guy is Unity Jesus.
Im getting
"SetDestination" can only be called on an active agent that has been placed on a NavMesh.
UnityEngine.AI.NavMeshAgent:SetDestination(Vector3)
enemycontroller:Update() (at Assets/enemycontroller.cs:28)
please someone help
window - AI - navigation - then select the floor u have go to bake and bake it - then go to object and select the floor u baked and check navigation static and generate offmeshlinks. I was having this problem too.
@@cast01 thank you so much this worked!! 😁
Fen1x_ I didn’t set the object to static that’s why it wasn’t working. Thanks for the help tho
@@cast01 thank you it worked for me to
@@cast01 Thanks very much.
It is keep saying, SetDestination" can only be called on an active agent that has been placed on a NavMesh.
UnityEngine.AI.NavMeshAgent:SetDestination(Vector3)
If anyone has a set destination error, follow these steps
1. Select your ground and check static on the top right corner of the inspector.
2. Keep your ground selected, and go to the Navigation tab. (Window>AI>Navigation) Then you should see a tab in Navigation called bake. Select it, and click bake on the bottom.
3. Play test your game. It might work it might not. If it doesn't work, follow the next steps. If it does, you are good to go.
4. Move your enemy ai closer to the ground.
5. Play test your game again. It might work it might not. If it doesn't work, follow the next steps. If it does, you are good to go.
6. If your enemy gets stuck in the ground, select your enemy, and in the NavMeshAgent, play around with the base offset. You should see a cylinder. Make that cylinder touch the ground.