Unreal Engine 5 Tutorial - AI Part 5: Hearing Perception

Поділитися
Вставка
  • Опубліковано 30 січ 2025

КОМЕНТАРІ • 80

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

    These are some of the best AI tutorials i have ever found. Everything is very clear, well coded and efficient. Keep them coming i am loving them!

  • @draicor
    @draicor 2 роки тому +71

    There is a small bug, if the player jumps and the AI hears it, it will run towards the sound, but while it reaches the sound location and waits the 3 seconds, if you jump again during the wait time, it will ignore the sound, as it never happened, even after he exits the wait node, it won't investigate the new location of the sound, even if its just behind him lol.
    I fixed it by going into the Investigate Sequence and changing the blackboard decorator observer value from on result change to on value change, that way, the AI will investigate the most recent sound the player makes, if he was already investigating a sound.

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

      Great catch!

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

      hi, i tried to doing this ai,but i'm playing with the first player character,and i have the string landed displayed,but once i'm equipped with the riffle it stop working,what could i do ??

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

      @@andrakesh I just started this and I see no one got back with you. I am also doing a first person project. I just did the same exact thing (copy and pasting) but this time using the rifle landed animation. Works like a charm. So now with or without a gun the AI will go to the location they heard the sound.

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

      @@trayvonray9614 it's cool, what i've did is just changing animation, it wasn't easy to find, cause i searched all animations trying to understand how it works,
      Thanks
      sometimes is not clear to understand how UE5 works

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

      @@andrakesh yeah I get that fasho bro

  • @AdityaKhonde-l9w
    @AdityaKhonde-l9w Рік тому +5

    Could you please tell us more about the AI debugging shortcuts

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

    This is brilliant my dude.

  • @GermanCarguy
    @GermanCarguy 9 місяців тому +2

    You know how you can sometimes not find a single video on a topic because there is already that ONE definitive guide that you just haven't found yet? Yeah... This is the guide.
    Haven't worked with UE AI yet, just getting in to it but so far this series is fantastic! Great work.

  • @gusdetommaso6781
    @gusdetommaso6781 Місяць тому

    These videos are great, thanks for making them! :)

  • @fuzzyhenry2048
    @fuzzyhenry2048 Рік тому +10

    I have no problem with sight stimulus but the hearing stimulus just doesn't work. The "On Target Perception Updated" won't be triggered by any noise event.
    Edit: I fixed it. The only mistake I made is I didn't check "Detect Friendlies". And that's kinda ridiculous. Because I don't need to check it in Sight config.

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

      I made the exact same mistake and only found it because of your comment. Thank you

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

      you saved me quite some time, thanks

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

      Thank you brother

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

      Just sayin bro, he literally pointed that out in episode 2 or 3 of the series.

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

    when i jump it doesnt call the event in abp manny

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

    Great video
    I have a bug that he doesnt follow me anymore how can I fix it
    I mean like he is seeing me but stops in his place
    thanks!

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

    How would you set the ai to perform an animation when they hear the sound for example?

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

    Hello Guys, I am making a project for my college where I am using the firstperson blueprint as my character and when I did all the steps for some reason the hearing is not working it is showing the yellow sphere when landing but the ai doesn't come towards the location and also I do not see the print string of the animnotif. I have double checked everything does anyone has any idea how can I fix it.

  • @TheSearunner
    @TheSearunner 9 місяців тому +2

    I cannot get this to work. I follow the steps exactly debug shows the sound happening but the AI will not investigate. Visual works, random works, the sound is registering but they will not investigate. All the fixes listed in the comments have been applied and not worked. Driving me nuts!

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

      Can you fixed?

    • @winrylust6947
      @winrylust6947 13 днів тому

      did you try and increase the loudness on 'report noise event'

  • @ShadowAimai
    @ShadowAimai Рік тому +5

    If for some reason the AI doesn't seem to be hearing, remove the senses and put them back in.

    • @vakonitas
      @vakonitas Рік тому +4

      Bonus: check first if you turned on all Dection by Affiliation boxes under Hearing Sense (Detect Enemies, Detect Neutrals and Detect Friendlies)

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

      @@vakonitas thanks

  • @hype._.
    @hype._. 2 роки тому +2

    I can see the green sphere representing Sight Perception, but can't see the yellow sphere representing Hearing Perception.
    String 'Landed' is seen at the appropriate time. What's the problem..

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

      is the code placed into your characters ABP not the AI's ABP?

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

      @@GVMuk I have the same issue, all the code is in the right place

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

    its weird i cant even get a print string on screen if i put right mouse button in my player connected to a print string

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

      Same issue here. Works in StandAlone Game though....instead of Viewport

    • @alexladoni-w7w
      @alexladoni-w7w 11 місяців тому

      @@nikpearsall1769 The AI debugger actually completely disables anything printed to the viewport. It's so dumb, EnableAllMessages fixes it but the second you compile anything it stops working

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

    Very good tutorial, thank you!

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

    Hello, I really like your guides, they are accessible and understandable even for beginners. I would like to make a game using the ActionRPGStarterSystem that I have from epic, but I can't change my character (metahuman) into a dummy. Can you make a tutorial on how to get it? I would be very grateful

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

    Thank you for this video !!!

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

    Hmmm, my AI isnt investigating the sound. I get the Yellow Spehere in debug. I can chase him around jumping around right behind him, but he wont investigate the sound?>

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

      Ok...after lots of playing around. If i set the Blackboardbased Condition to "Aborts Both" its works. "Self" doesnt work and the AI does not recognise the noise.

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

      @@nikpearsall1769 nice one mate. Worked for me, did you use a separate model/mesh for your AI than the unreal engine mannequinn? i used 2 different models and i guess aborting self works if both models are the same for player and AI maybe?

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

      @@nikpearsall1769 Thanks, worked for me as well!

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

    i dont have event receive execute ai 8:05

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

    had an issue with the ai not being able to move to the patrol point when it was on it. I found that if i set collision to pawn in the object it fixed it. If anyone has a better solution tho lemme know

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

    hey man since we are here on ai any chances to get a little more "advanced tutorial about it? like showing how to make a ai AI choosing what to do based on "status" like a hungry npc would go to a place to grab something to eat or when attacked it can "choose between fight back or run based on choices, because so far is something i really missing in ais tutorials how to make a ai make choices based on some game variables, like time, being attacked, hunger, thirst if damaged attacked scared , how to create a ai which would behavious in different ways based on what is happening around it like in many games.
    also any chances to add some of the new features from the 5.1 like the mass ai or the smart object and others stuffs.

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

      I think it is more complicated nodes and behavior tree

    • @MatthewGarcés-x8h
      @MatthewGarcés-x8h Рік тому +1

      I recommend you to visit Ali Elzoheiry's channel. His AI playlist seem to go in to greater detail in AI in general, while Ryan laley does a bit of everything

  • @xernmark2061
    @xernmark2061 27 днів тому

    Everything is perfectly fine but I've problem in the Hearing ... my enemy hears my sound but Dont come to chase me... What could be the issue???

    • @winrylust6947
      @winrylust6947 13 днів тому

      did you try and increase the loudness on 'report noise event'?

    • @xernmark2061
      @xernmark2061 12 днів тому

      @winrylust6947 issue is solved now. I made it again and now it's working. Maybe I've made some mistake earlier

  • @ashishmaan4425
    @ashishmaan4425 16 днів тому

    So I am doing this in 5.4 and putting 2 sense in senses config in a component don't work for some reason. For hearing to work you need to make a new AiPreception component and add only hearing into it and call on Target perception updated. 0_0

    • @ashishmaan4425
      @ashishmaan4425 15 днів тому

      I found the issue Adding AiPreception in character BP Create the above problem. If we add AiPreception in controller it work fine.

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

    i think my code is working but cant really verify the way it is showing on your screen. can you please tell me which key you used?

    • @xernmark2061
      @xernmark2061 27 днів тому

      ' this key is used. and then press 4 on numpad

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

    Are you still doing the JRPG series??

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

    Thank you Rayan,
    I have problem, in the part 3 AI sight and chase work fine but once I add hearing system. AI will just go to Sound and he will not follow or chase the player. Any idea ?

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

    you are amazing

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

    thank you!

  • @MaskInc-zh8wy
    @MaskInc-zh8wy Рік тому

    I have followed the exact same steps but it still doesn't work for me. And for some reason my debugging for perception doesn't work when I press 4.

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

      make sure the code for the Animation BP is in your Player characters BP not the AI's ABP

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

      You have to press 4 on the keypad on the left of the keyboard instead of the main line of numbers on the top of the keyboard.
      Make sure "num lk" (number lock) is on.

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

      @@GVMuk Thank you! I chased my tail, followed the video a few times...then duh.

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

    I cannot see any spheres when i press the ' key

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

      You press the key and after, use the number pad 0-4 to select the mod.

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

      @@UnrealByYourself thanks

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

      @@UnrealByYourself For me, I still can't see anything. Any idea what it could be? I press the ' key, then 0-4 on my numpad but literally nothing happens. Kinda frustrating

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

      @@Lier90 Yeah, sometime I have the same problem. I found out that I use English Canada Multilanguage Keyboard and I have to change it to English Canada or vis versa.

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

    If you're dumb like me and end up in a loop where the ai will go towards the last known location and then get stuck in a wait loop, check you set the clear blackboard key to target location... I spent 10 minutes wondering what was wrong

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

    why does plugging in 0 in Max Range drastically increase the Range it can hear you?