3D ENEMY AI in UNITY - (E01): STATE MACHINE BEHAVIORS

Поділитися
Вставка
  • Опубліковано 18 жов 2024

КОМЕНТАРІ • 107

  • @Mikes-Code
    @Mikes-Code Рік тому +5

    If someone wants to have multiple enemies just randomly walk around, you can place 4 waypoint as children of the enemy (north-west-east-south).
    This way the enemy will follow its own waypoints, and always move to random location. Of course it means less control, but more AI freedom thinking.

    • @angelkaki5707
      @angelkaki5707 8 місяців тому +1

      Could u make a video about it please

  • @crimson7632
    @crimson7632 Рік тому +8

    I went into the Windows tab and from there I went into Rendering and then from there I selected Render Pipeline Converter. A windows should pop up where and there should be a drop down box where I selected the Built-in to URP option. After that tick all the boxes, and press the Initialise converter button on the bottom left. If everything went ok the just press Convert Assets. A URP render pipeline should be made and automatically added along with all materials converted to URP. Hope this helps.

    • @ABHIJOSE-w4z
      @ABHIJOSE-w4z 5 місяців тому

      thank you so much for this....i was clueless how to render it because pipeline render option wasnt showing when i selected the main scene.

  • @melted__
    @melted__ 9 місяців тому +3

    Been trying to do this for the last 3 days watching so many other tutorials but nothing was working. This took be 30 minutes to understand and got it working perfectly. Thank you so much. Subscribed

    • @GDTitans
      @GDTitans  8 місяців тому +1

      Great to hear!

  • @privicyismyth9958
    @privicyismyth9958 2 роки тому +8

    Continue this series

  • @tmauldin7771
    @tmauldin7771 2 роки тому +5

    Thanks for the tutorials. Short, sweet, and to the point. Keep up the good work.

  • @PlayOurGamesHorrorGames
    @PlayOurGamesHorrorGames Рік тому +2

    Ty For The Information! Now Imma Create A New Game!
    ( The Dragon's Cave Of Horror )
    ( But It'll Be A While)

  • @graytreegames6151
    @graytreegames6151 2 роки тому +7

    Great tutorial! Having trouble scaling this setup for multiple enemies with different arrays of waypoints. Any idea how to alter the intake for multiple enemies?

  • @angelkaki5707
    @angelkaki5707 11 місяців тому +2

    Awesopme stuff bro!

    • @GDTitans
      @GDTitans  11 місяців тому +1

      Appreciate it!

  • @petethechin
    @petethechin Рік тому +3

    Best explanation of this I have seen!

  • @PoplinPlonk
    @PoplinPlonk 18 днів тому

    wow i was just wondering how to delay an animation but google search only said "use invoke function" whatever. so lucky you included this.

  • @gmangman123
    @gmangman123 Рік тому +3

    Thx for tutorial master!

  • @infosource3153
    @infosource3153 Рік тому +3

    Keep up the good work

  • @kewpie9496
    @kewpie9496 Рік тому +3

    Good day sir, great tutorial! But i followed all your tutorial exactly but my AI is just on idle and does not start walking, what do you think could be the problem?

  • @zaaa8595-y4z
    @zaaa8595-y4z 2 роки тому +2

    Best youtube channel ❤️🔥🔥🔥🔥

  • @LuckySaebyeok
    @LuckySaebyeok 11 місяців тому +1

    Thank you for providing me with quality information. I have a question, how do different types of monsters share the same variables (player transform, navmeshagent, monster attack threshold distance, etc)?
    There are a lot of monsters I have to deal with to declare a variable for each animation class.

    • @LuckySaebyeok
      @LuckySaebyeok 11 місяців тому +1

      All monsters share a similar structure. So I created a single-tone class and declared the variables.
      I brought the variable to each state class and used it, but it doesn't look good to bring the variable from a function such as 'update' as an instance, so I'm thinking about it.

  • @tigerjustice
    @tigerjustice Рік тому +1

    You have created a very useful course. Thank you very much

  • @synmad3638
    @synmad3638 Рік тому +2

    Great video!

  • @malikthetalentmaker6001
    @malikthetalentmaker6001 2 роки тому +1

    The new intro is ultimate

  • @indiestudio23
    @indiestudio23 2 роки тому +4

    Excellent videos brother pleases make videos on 3D Games with Touch controls please there is no videos about this content in entire UA-cam

    • @GDTitans
      @GDTitans  2 роки тому +4

      sure! no problem

  • @LaibaEhsan-fq5kc
    @LaibaEhsan-fq5kc 2 місяці тому +1

    what to do ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index

  • @supergamerlol6524
    @supergamerlol6524 8 місяців тому

    hii can you help me? when i put the animations in ispatrolling the animation of idle is only play can you help me? i put no exit time and i put bool is patrolling and i dont know why i put the steps of the video but the animations is not working only the idle

  • @samirdahal4030
    @samirdahal4030 2 роки тому +2

    can you make video in car physics sysytem. How to drive car from wheel colider. i need the help of you

  • @UptownFade666
    @UptownFade666 6 місяців тому +1

    I wish you had an updated video. I've been messing with this for days and it doesn't recognize the any active NavMesh agents. I've followed this video to the T and repeated multiple times, and looked up a current NavMesh tutorial. The Navigation static option is greyed out for me and not greyed out in current tutorials, and this video doesn't work at all.

    • @GDTitans
      @GDTitans  6 місяців тому +2

      Sorry 😔 but I'm gonna create an updated video about the new navmesh system in unity

    • @UptownFade666
      @UptownFade666 6 місяців тому

      @@GDTitans Sorry for coming across aggressive or fruustraed in the last message. It was late and I was frustrated, which is no excuse, but yes, I could not figure out how to get it to work using a a different updated NAvMesh tutorial, but you explain th9ings well, so I would love an updated video if you ever get around to doing one.

  • @ItsReece2
    @ItsReece2 Рік тому +1

    How do you make this work for multiple enemies? Only seems to work with only one enemy. Thanks.

  • @goodpersonff
    @goodpersonff 2 роки тому +2

    yeaw waiting for ep 2 of previous video of bow arrow system

  • @angelkaki5707
    @angelkaki5707 11 місяців тому

    Could you dm me about how to set up a waypoint patrols that won’t affect each mob? I’ve tried set up some but all
    The mobs end up going to the other waypoints instead of the set up ones xD

  • @triggeredsalt8755
    @triggeredsalt8755 Рік тому +2

    Great video man, however I have an issue. My character transitions from idle to patrolling but it animates without moving. I have checked the nav mesh area, tried with and without root motion on the animator and the animations but I can't get the character to move to the waypoints. Any advice as to why it is not moving? I can see others have had the same issue in the comments. Thanks in advance

    • @LilyBettess
      @LilyBettess Рік тому +1

      make sure the walk state animation has the patrol state script connected, mine wasnt there and when I added the behaviour it fixed it. :)

    • @raptorix-animations
      @raptorix-animations Рік тому +1

      Make sure that your player has a player tag. It fixed it for me. Hope it helps!

    • @denissarmento25
      @denissarmento25 Рік тому

      Don't forget to check the parameters and the correct spelling. So you should check the spelling, the parameters (e.g. Boolean values), the scripts associated with each state, their animations, tags, navmesh and I guess that's all.

  • @bilalakkari7181
    @bilalakkari7181 2 роки тому +3

    Can you make a tutorial to how create a 2d multiplayer game ?

    • @GDTitans
      @GDTitans  2 роки тому +5

      I guess it's gonna be our Next Series.

  • @GamesDeveloper-v4j
    @GamesDeveloper-v4j 15 днів тому

    Amazing sir you solve my big problems wo great sir thanks a lot

  • @elrincondelnpc
    @elrincondelnpc 6 місяців тому

    Hi, i have a problem, the enemy goes through walls when it is patrolling, i added it a capsule collider but then it can't climbing stairs, so i added it character controller and now it can climb stairs but it's going through walls again. Do you know how to fix that?🤔
    Very useful video anyway

    • @luxrose
      @luxrose 6 місяців тому

      make sure that the walls are included when you bake the navmesh

  • @medhabibbenyoussef9391
    @medhabibbenyoussef9391 11 місяців тому +2

    in the environment the navigation static is disabled what should i do please ?

    • @overrideFunction
      @overrideFunction 10 місяців тому

      I'm hoping you already found a solution, but it's disabled because they depreciated the old navigation system. You no longer need to mark things as navigation static. If you search new unity navmesh tutorial you will find more up to date videos.

  • @federicovolpi3195
    @federicovolpi3195 8 місяців тому

    when I write the string under update method, timer += Time.deltaTime the word Time doesn't work (doesn't get green) why??? and the game gives me error i yhink because of that... what I'm missing?

  • @Juanzett
    @Juanzett 2 роки тому

    i love you man, u are the best

  • @zandmunimdesignanddevelopm8061
    @zandmunimdesignanddevelopm8061 2 роки тому +2

    New sub here man, checked a cpl videos and love your tutorials :)

  • @gabrielsamuel9499
    @gabrielsamuel9499 2 роки тому +2

    Hi nice job I really like your tutorial can your next tutorial be about making an RPG game. I would really like that, thanks so much.

  • @karimhamza8429
    @karimhamza8429 2 роки тому +2

    the enemy is making moving animation in its place without moving around wayponits , any solution ?

    • @GDTitans
      @GDTitans  2 роки тому +2

      Check out the NavMesh area

    • @maxihuebra
      @maxihuebra Рік тому

      I have the same error, were you able to solve it? Help me pls

    • @LilyBettess
      @LilyBettess Рік тому

      make sure the walk state animation has the patrol state script connected, mine wasnt there and when I added the behaviour it fixed it. :)

  • @VinayakHiremathKLCS
    @VinayakHiremathKLCS Рік тому

    I have used this method on AR it is working in scene but not in mobile app. what to do ??

  • @LabLore1
    @LabLore1 10 місяців тому +2

    does anybody have the code to paste it ?

  • @bonestudios7777
    @bonestudios7777 Рік тому +1

    Thanks

  • @Mustaf-cr7
    @Mustaf-cr7 3 місяці тому

    @GDtitans can u type all of the idle state and walkstate script in here? plssssssssssssssssss

  • @mohcinebelaid7096
    @mohcinebelaid7096 Рік тому +1

    Can you made Boss fight game

  • @superdatascience9624
    @superdatascience9624 2 роки тому +1

    How to control car from wheel colider

  • @goodpersonff
    @goodpersonff 2 роки тому +1

    goodddd

  • @johnbekiaris8766
    @johnbekiaris8766 Рік тому +1

    I cant get the dragon to move. I have followed it exactly

    • @damlaa.7879
      @damlaa.7879 5 місяців тому

      same

    • @damlaa.7879
      @damlaa.7879 5 місяців тому

      i fixed it. go to the controller page and click and enable on "isPatrolling" bool

  • @davidzenteno1240
    @davidzenteno1240 2 роки тому +3

    4:39 how to make animation

  • @Anytrailer07
    @Anytrailer07 2 роки тому +1

    good tutorial

  • @ayantrambaran2532
    @ayantrambaran2532 5 місяців тому

    I'm getting this error
    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index

    • @LaibaEhsan-fq5kc
      @LaibaEhsan-fq5kc 2 місяці тому +1

      same do yo know how to solve it ?

    • @ayantrambaran2532
      @ayantrambaran2532 2 місяці тому

      ​@@LaibaEhsan-fq5kc i did actually

    • @ayantrambaran2532
      @ayantrambaran2532 2 місяці тому

      If you can wait till tomorrow ill try and help you with it

    • @ayantrambaran2532
      @ayantrambaran2532 2 місяці тому

      Basically I think it's either a problem with your code or with your way points
      If it is with your code you need to redo it
      If it is with your way points make an empty game object and Tag it WayPoints or whatever name you want to but it must match in your script and make the children the destination you want the enemy to follow and leave the children untagged
      Hope this helps you

  • @hollowdevelopment1
    @hollowdevelopment1 2 роки тому +2

    Thank you so much, been looking for a good tutorial like this for a while to learn AI and animations! Thank you again!

  • @davidzenteno1240
    @davidzenteno1240 2 роки тому

    My character is not moving around waypoint to waypoint and my walking animation stops and doesn't loop. How do I fix this?

    • @karimhamza8429
      @karimhamza8429 2 роки тому

      I have the same problem the enemy is making moving animation in its place without moving around wayponits , any solution ?

    • @maxihuebra
      @maxihuebra Рік тому

      I have the same error, were you able to solve it? Help me plsss

    • @mohammadilman1083
      @mohammadilman1083 Рік тому

      @@maxihuebra try to bake again the navigation

  • @ShirshoSinha
    @ShirshoSinha 8 місяців тому

    what is the Time variable?

  • @iamabhishekchoudhary
    @iamabhishekchoudhary 2 роки тому +2

    Please make it with mobile controls

  • @puahlh1802
    @puahlh1802 Рік тому +1

    Object reference not set to an instance of an object for the agent part. In my case I have 2 enemies currently. Anyway to solve this?

  • @ShivanshMishra-z7l
    @ShivanshMishra-z7l 6 днів тому

    can you please give me the scripts for the animation of the monster please
    anyone

  • @normanvenyahjr2076
    @normanvenyahjr2076 9 місяців тому +1

    I don't have nav mesh

    • @GDTitans
      @GDTitans  9 місяців тому +1

      Probably, you are using the new release of unity, so you have to install it from the package manager
      Search for AI navigation

  • @chiogamingyt4396
    @chiogamingyt4396 Рік тому +1

    thank you so much but can you give me the patrole state script please???

    • @GDTitans
      @GDTitans  Рік тому

      Project Files
      github.com/Chaker-Gamra/Third-Person-Controller

  • @abdalrahmanahmad9146
    @abdalrahmanahmad9146 2 роки тому +1

    👍👍👍

  • @thedarksoulandlight3163
    @thedarksoulandlight3163 5 місяців тому

    For anyone having the ArgumentOutOfRange error; do NOT tag each waypoint, only the parent of the waypoints

  • @shootxnow132
    @shootxnow132 2 роки тому +1

    my character goes undergound whyy??

    • @GDTitans
      @GDTitans  2 роки тому +2

      You have to add colliders to the map

  • @brohamhd8644
    @brohamhd8644 Рік тому +2

    Oof it made a error

  • @zdxqi_8941
    @zdxqi_8941 Рік тому +1

    its not working for mobile
    when i build my games
    its not patrolling or chasing

  • @malikthetalentmaker6001
    @malikthetalentmaker6001 2 роки тому +4

    ان شاء الله هتعلم منك كورسات كتير في اجازه نص السنه
    ادعيلي في الامتحانات الإعدادية

    • @GDTitans
      @GDTitans  2 роки тому +4

      الله يوفقك

  • @davidzenteno1240
    @davidzenteno1240 2 роки тому

    12:39

  • @tr_gaming0911
    @tr_gaming0911 Рік тому

    الله يبارك

  • @emilyallen7912
    @emilyallen7912 Рік тому

    just add the code because most of us just want to learn the code not how to impliment i singular asset

    • @emilyallen7912
      @emilyallen7912 Рік тому

      honestly i should have watched the rest tho sorry im gonna do that now sorry

  • @Mr_Bombastico39
    @Mr_Bombastico39 Рік тому +1

    Hello,
    can you post link for scripts
    if you can,
    Please.

  • @bauxitegamingworld9402
    @bauxitegamingworld9402 5 місяців тому

    what to do ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index