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.
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
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
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
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
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 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 '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 --ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-9tePzyL6dgc.html
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
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.
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?
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.
Severity Code Description Project File Line Suppression State Error CS0246 The type or namespace name 'Interactable' could not be found (are you missing a using directive or an assembly reference?) Assembly-CSharp C:\Users\Jack l\Unity\Game\Assets\000Scripts\Zombie Scripts\Enemy.cs 7 Active
Paul that most likely means you made referenced a variable/object in the code that doesnt exist, so you either spelled something wrong, or just completely messed up somethings name
Sorry I'm a bit late, but to anyone else who has this problem: Make sure to watch this video first -ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-9tePzyL6dgc.html
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
"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:27) can someone help me?
@@monkeyballs188 How i do that? In my Console apears this : "SetDestination" can only be called on an active agent that has been placed on a NavMesh. UnityEngine.AI.NavMeshAgent:SetDestination(Vector3) AgarrameSiPodes:Update() (at Assets/AgarrameSiPodes.cs:38) Pleas answer the soon as you can :c
@@mateodemicheli2420 Go to the windows tab at the top and find the navigation panel(should be in the AI section). Then click over to the bake tab and bake.
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
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
error CS0506: 'Enemy.Interact()': cannot override inherited member 'Interactable.Interact()' because it is not marked virtual, abstract, or override help!
Thank you for your videos! But i encounter some problem. It is working. but when i put a new enemy not the first one. there's 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:35) It is the same as the first enemy it have rigidbody, navmesh agent and the scripts that works in the first enemy . somebody help me :3
Finlay Fulton drag a prefab that look exactly like the model you are using as a enemy then exclude it from any thing attached to it except the rigid body meaning you need to remove the animator and the Ai script then make it rag doll by right clicking it in the hierchey and press 3D model then press rag doll and assign the bones to it for the fpsc just drag the playable character to it Edit: btw when you make it rag doll and making it as a oregano drag it to the zombie rag doll sorry for calling it zombie but because I was using it for my zombie game
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.
I have 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:27) Can someone help me?
1º)In your scene click on a mesh or train and then in Window tabs select navigation... Now u can see navigation layout beside the inspector... Just in bake tab of navigation click the bottom button that says Bake... And you're done If you have already done this and the problem persists: 2) probably the point where your gameobject is being instantiated outside the reach area of ??the mesh (terrain or plane or quad). Change the position of the spaw point into the area of ??the mesh.experiment by putting this spaw point in the center of the terrain to see. I hope I have helped!
@@talibalasrar ok so go to the window tab then head to ai then navigation. click on the object tab and set it to navigation static then make it walkable. then try baking. hope that helps
@@mr_moon2374 I got stuck on this as well and try doing what you wrote but it doesn't work. At the start it says "Failed to create agent because there is no valid NavMesh" I don't understand what's wrong? Can you help?
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
Can someone help. I keep getting this error: "Failed to create agent because there is no valid NavMesh". I've tried baking it but it still doesn't work! What is wrong???????????
hello, to make this work you need to set your ground to static(and your obstacles) then bake turn off Auto lightning if still doesn't and set your obstacles in the scene as "Navmesh Obstacles".
I tried to attempt this but form some reason I keep getting two errors: NullReferenceException: Object reference not set to an instance of an object EnemyController.Start () (at Assets/Scripts/Controllers/EnemyController.cs:15) NullReferenceException: Object reference not set to an instance of an object EnemyController.Update () (at Assets/Scripts/Controllers/EnemyController.cs:22) Anybody have any idea whats wrong?
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!
I have one problem and it's : NullReferenceException: Object reference not set to an instance of an object EnemyController.Update () (at Assets/Scripts/Controllers/EnemyController.cs:22) can someone help me please ?
Can someone help me? I have a problem with the nav mesh agent. I checked my script to be like brackeys' but it don't work. Unity says: SetDestination can only be called on an active agent that has been placed on a NavMesh. UnityEngine.AI.NavMeshAgent:SetDestination(Vector3)
sumerian ozzyz i fixed it. Make a group for the floor and go to window then navigation and its gonna open a bonus window next to the inspector. Then go to objects select mesh renderer and select the floor group(the y axis should be the same) then do this group static - yes for all children and then go back to navigation and bake the floor. Ask if you havent understand
have you dragged it into the inspector (when you create for example public GameObject player you need to drag the object - the player in the inspector)
PLEASE HELP: It says Object reference not set to instance of an object and it doesn't follow my player even though I baked the NavMesh on the map and everything. I'm trying to add it into a FPS zombie game.
Hmmmm... I'm pretty sure it was something simple and a dumb mistake like I accidentally took of the navmesh or something. also make sure you dragged it onto that script spot on your character. If you can't figure it out still what I would do is just try to remake your enemy. That might sound daunting but you will be suprised how fast it goes the second time and it will look better. Good luck!
does not work. ive tried baking the plain, where it would move the enemy and it is still giving me some destination erros. bad tutorial in my opinion UPDATE: i've founded a solution that should work to this date. if you go to your terrain model (where you can move your player), and add a new component called Nav Mesh Surface, and click on the bake button it should work!
This is the first Brackeys video that was helpful for me others were just a waste of time. Sorry Brackeys FANS. Edit:-The thing I thought that was helpful was not helpful at all.
Only on line one of the script and it’s already not working for me, it’s like I’m cursed It won’t come up with the red sphere lookRdius thing it just keeps saying “an object reference is required for the non-static field, method, or property “Transform.position” 😭😭😭😭
on your enemy, do you have Nav Mesh Agent Component? If you don't, you need to press Add Component, and in search bar type: "Agent" or "Nav", i think i explained it.
much love, i am still waiting for a link to donations, i dont want to use patron and your link for brakeys.com/donate aint working! (maybe a paypall link??)
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