Easily Make Ai Animals That Chase And Flee In Unreal Engine

Sdílet
Vložit
  • čas přidán 6. 07. 2024
  • In this video I teach you how to easily make two different types of Ai animals using Blueprints in Unreal Engine. This method is beginner friendly and does not use complicated techniques like behavior trees.
    In this video you'll learn how to make an aggressive Ai animal that roams around and then chases the player once they see them. You'll also learn how to make a passive Ai animal that roams around and flees from the player to a specific hiding spot and only comes out when the player is out of range.
    Wolf Asset:
    www.unrealengine.com/marketpl...
    Rabbit Asset:
    www.unrealengine.com/marketpl...
    Talk to me on my Discord Channel:
    / discord
    I get all of my stock footage and music from Envato Elements. If you’re interested in getting a subscription, use my affiliate link as it helps fund my channel!
    1.envato.market/ElusivePanda
  • Hry

Komentáře • 61

  • @rbgiorgi
    @rbgiorgi Před 3 měsíci +1

    This tutorial is amazing, and very easy to follow! Thanks for sharing!

  • @jamesonvparker
    @jamesonvparker Před rokem

    This was a damn good tutorial format man.

  • @Restart-Gaming
    @Restart-Gaming Před 9 měsíci +1

    Great video right to the point. Will you be doing any others on this like using attach and death if animal is shot etc This one was GREAT A++++++++

  • @Mw2Dagger
    @Mw2Dagger Před měsícem

    Great tutorial! Keep it up!

  • @samnwakefield2032
    @samnwakefield2032 Před 11 měsíci

    you def gotta keep up these amazing tuts....AI with blueprints more of them .

  • @immanueljenkins5036
    @immanueljenkins5036 Před 10 měsíci +6

    Tip on ai move to, use on success into shuffle instead of the first pin. For me it doesnt work if i use the first pin

    • @jmarte6089
      @jmarte6089 Před 10 měsíci +1

      Same here. I also had to not add the "slot_default" in the anim bp; it caused issues

    • @azzeddindouakha3403
      @azzeddindouakha3403 Před 5 měsíci

      big thank you

  • @lolaswift111
    @lolaswift111 Před 6 měsíci

    You're awesome! thx.

  • @kostasksilas
    @kostasksilas Před 20 dny

    Great tutorial mate!
    I just wanted to ask if there is a specific reason for using loops.
    I tried a different approach, by getting the length of the animation montage array then feed that into a random integer block as the maximum value and then getting a copy of the array element using that result as the index. This gives as the animation montage to play.
    Save that into a new animation montage variable (CurrentAnimationMontage for example) and then feed that into the play animation montage and into the stop animation montage.
    I think this way you can avoid for loops, and have slightly better performance.
    I'm just starting my journey into UE and as I watch more and more tutorials to get myself familiar with the mechanics and the engine, I see the usage of for loops is quite common in similar scenarios which could easily be avoided and I wonder if there is something I'm missing here.
    Again thanks for the great tutorial and for your time. Keep it up :)

  • @SKIROW
    @SKIROW Před měsícem

    Your tutorial was very useful for me. Thank you very much for sharing! 👍
    Quick question: I used your tutorial to make a chicken coop. I works but with I leave the safe zone only one chicken comes out. Seems like I made my chicken coop too cozy. Any idea how can I make all the chicken get out without having an eviction notice?
    Thanks again!

  • @lolaswift5019
    @lolaswift5019 Před 5 měsíci

    Love this

  • @sebstepet
    @sebstepet Před rokem

    Very nice video! Where did you get the models and animations?

    • @ElusivePandaGames
      @ElusivePandaGames  Před rokem

      Thanks! I've updated the description with the links to both assets.

  • @unsupporteddevice
    @unsupporteddevice Před rokem +2

    my wolf roamed fine until i added animations, unfortunately removing them again didn't fix it

  • @immanueljenkins5036
    @immanueljenkins5036 Před 10 měsíci +3

    Lmao my animals playing the montages for walking now completely took away roaming

    • @ElusivePandaGames
      @ElusivePandaGames  Před 10 měsíci

      This is a common mistake people seem to be making. On your for each loop when shuffling your array, make sure you're dragging out of the 'Completed' pin and not the 'Loop Body' pin when connecting to your play anim montage node.

    • @rekaidavid
      @rekaidavid Před 10 měsíci +2

      @@ElusivePandaGamesSadly that doesn't fix the issue. While the wolf is roaming the animations still playing. And there are no walk animations now.

    • @heresmynovel331
      @heresmynovel331 Před 9 měsíci

      @@rekaidavid
      Have you fixed the issue??
      don't

    • @heresmynovel331
      @heresmynovel331 Před 9 měsíci

      Any solutions for the issue??

    • @toskael6446
      @toskael6446 Před 7 měsíci

      @@ElusivePandaGames I've dragged out of the 'completed' pin but still have the same issue. The roaming works until I start following the animation montage section of your tutorial and I'm about to rip out all of my hair trying to fix the issue ;-; It's one of the best tutorials I've seen for this, just wish I wasn't running into this problem cos I really really need it to work lol

  • @KillerDudeT19
    @KillerDudeT19 Před 7 měsíci

    How can I make it to where half of
    the animal doesnt go through the wall without making the sphere collision giant?

  • @TheCultOffical
    @TheCultOffical Před 11 měsíci +1

    That is pretty good, My question is how would i get the animal to run to the closes hole nearby. It runs to the first placed hole in world. But this one no matter how many i place it all of them run to the first placed.

    • @sagesstage6121
      @sagesstage6121 Před 6 měsíci +1

      Try the command "Get all actors of class," get a copy from the array of said actors and promote to variable. Feed this into the Target Actor of the AI MoveTo function as normal. This should have the animal select the closest nearby Actor of the selected class. Also works for characters chasing other characters, and any other Chase-Actor interaction you can think of

    • @TheCultOffical
      @TheCultOffical Před 2 měsíci

      @@sagesstage6121 Sorry that didn't work. I am using a spawner to get the animal to spawn in world.

  • @envyingcentaur5357
    @envyingcentaur5357 Před 2 měsíci

    I'm running into the issue where my wolf is repeating the idle only montage and it's not rotating through. And I have the shuffle on there I'm just trying to figure out what could possibly be causing it or not to rotate

  • @3BEEZ
    @3BEEZ Před rokem +2

    My wolf just drags all over the place (no walk or run animation), not quite sure what went wrong but will keep at it.

  • @rekaidavid
    @rekaidavid Před 9 měsíci

    My rabbits sensing and hiding is completly broken :(. Can you help me fixing it?

  • @kurumilive3521
    @kurumilive3521 Před rokem +1

    Hi, good, I'm following the steps, but when the wolf has to run with the animations, it only reproduces the idle one, any help please?

  • @mohitlm3413
    @mohitlm3413 Před 4 měsíci

    bro how to make the wolf hit or bite the third person?

  • @Sith90lord
    @Sith90lord Před 3 měsíci

    My "cast to AI_Wolf" fails.
    How do i debug it to find out why?

  • @user-dh4hj8xm5f
    @user-dh4hj8xm5f Před 4 měsíci +1

    I did everything as in the video and after adding anim montage, my wolf stopped using walking and running animations and just slides and sometimes uses rest animation. Can you help solve this problem?

  • @CarscottScott
    @CarscottScott Před 2 měsíci

    My animals don't disappear, any thoughts?

  • @heresmynovel331
    @heresmynovel331 Před 9 měsíci +1

    Hello there
    What if I want to have a deer that flees from the character??
    What do I need to put there instead of "AI Move To" 8:52 🙁

    • @ElusivePandaGames
      @ElusivePandaGames  Před 9 měsíci

      This tutorial is more focused on having a pre-determined destination. The Rabbit runs from the player but only towards their predetermined destination. I found this easier to implement and understand for a beginner/intermediate which is who I try to make my tutorials for.
      There are tutorials on youtube for making an ai run away from the player. It's not too hard but it is more complex than this setup and requires a different logic setup entirely.

    • @terryp594
      @terryp594 Před 3 měsíci

      Good evening, that's my question exactly I've searched online for 2 days trying to find a decent tutorial to explain just that, having a deer running away from player but they are all extremely complex and are very hard to follow especially after making the original Ai Blueprint, and The Animation Bp. I'm at the same place I have it all except for "AI Move To" at 8:52. Ive tried the AIPerception and the Behavior Tree but was not successful in either. BTW Awesome tutorial it's one of the best out there.@@ElusivePandaGames

  • @Jordan-vv7jg
    @Jordan-vv7jg Před 4 měsíci

    So after adding the anim montages blueprints my wolf no longer runs/walk and just glides. It also will activate the rest anim while moving. Ive watched the video multiple times and im lost. Any help?

    • @ElusivePandaGames
      @ElusivePandaGames  Před 4 měsíci

      You need to add the default slot to the anim bp.

    • @Jordan-vv7jg
      @Jordan-vv7jg Před 4 měsíci

      So I already have the default slot on my anim bp

  • @islandonlinenews
    @islandonlinenews Před rokem +2

    I have done everything correctly but no movement. any suggestions?

    • @ElusivePandaGames
      @ElusivePandaGames  Před rokem

      Are the animals not moving? Maybe you still need to add the nav mesh. If you reach out to me on Discord I might be able to help you. Link in description.

    • @islandonlinenews
      @islandonlinenews Před rokem

      @@ElusivePandaGames yes animals not moving. definately have perfect nav mesh. Behaviour tree says “inactive” while testing. Any suggestions?

  • @istanbulprivate
    @istanbulprivate Před 10 měsíci +1

    Everything works fine but when the AnimMontages are working (for example sleeping or idle) it keep moving, I re-watched 3 times but I couldn't find the problem :( And also I want to JumpBite when it cathes the player but I don't know how to do that either :(

  • @TheDinky21
    @TheDinky21 Před rokem

    Could I send you a message on discord about a question I have? I can't get this thing to stop chasing me.

  • @Gladiy
    @Gladiy Před rokem

    Hi. Thanks for the AI Wolf video. Can you give me a hint? I added a dog, but when I move it is thrown back.Hi. Thanks for the AI Wolf video. Can you give me a hint? I added a dog, but when I move it is thrown back.

    • @ElusivePandaGames
      @ElusivePandaGames  Před rokem

      Hard to say without reviewing your code. You can reach out to me on discord and I can take a look if you send me screenshots.

  • @flokzybtw
    @flokzybtw Před 10 měsíci

    After Adding the Montages Section there is no Animation anymore

    • @rekaidavid
      @rekaidavid Před 10 měsíci

      same

    • @flokzybtw
      @flokzybtw Před 10 měsíci

      @@rekaidavid fixed it, I forgot add the Volume Room

    • @rekaidavid
      @rekaidavid Před 10 měsíci

      @@flokzybtw Volume Room? where do u add that?

    • @flokzybtw
      @flokzybtw Před 10 měsíci

      ​@@rekaidavid 1:56

    • @flokzybtw
      @flokzybtw Před 10 měsíci

      NashMeshBoundsVolume

  • @fawkurface46
    @fawkurface46 Před 16 dny

    Man I would pay a monthly sub just to have 1on1 training with you