Unreal Engine 4 Tutorial - AI - Part 10 Hearing Perception

preview_player
Показать описание
We first improve our existing AI perception, and then we go through to how to make a distraction to distract a guard and call their attention. The guard will then investigate for hostiles.

Subscribe now to catch each video as they are released each week.

Рекомендации по теме
Комментарии
Автор

There is a bug after this video which causes the NPC to stop seeing the player. This is addressed and fixed at the start of the next episode.

RyanLaley
Автор

For those wondering, if you can't get your AI debugging to work, you have to actually be looking at the AI before you press the apostrophe key. If you don't then the debug opens but the engine doesn't know which AI you are trying to debug. You'll know you've got it because you get a shitload more info if you do it correctly.

Birdjuice
Автор

The problem i get is that my AI get stuck on the node "Rotate to face BB entry", he doesnt move when gets there... But if i remove it, it works fine..

EDIT:
I found this solution: If you don't have the UseControllerRotationYaw set on your pawn, it doesn't work

martinds
Автор

Thank you for doing this. Finally a decent tutorial on how to do this

agentarachnid
Автор

I had a problem where the npc would still go to the location of where I made a sound even after it already saw me. To fix this change the max age of the hearing sense under the AiPerception of your NPC_AI to 0.1. Then add the stop investigating task at the start of your Chase Player sequence. So it would forget immediately where the sound came from, but would still follow the investigating part in the behavior tree. Then if you interfered, it would forget all about that whistling spot.

hellsgate
Автор

I had to wait 10 episodes to be told about the AI debug??? I thought we were friends!!! tip. Thanks so much for that.

clebo
Автор

bro really thank you so much plz keep it up u just guided me where i couldnt find such tutorials u deserve so much u are great thank you

jeshiabood
Автор

Don't know what I did wrong but when my character is spotted the npc always know where i'm hiding, even if sight is lost

mnl_lnm
Автор

Love this, AI in games interests me a lot. Thanks for sharing :)

MarkOfArgyll
Автор

I would first like to say this is a great video and helped me out a ton! However, I noticed an interesting bug that I want to point out for a specific case I had.
I'm using this AI in a grenade-focused game and wanted to have the enemies investigate explosions they hear. However, because the grenades could be thrown to areas unreachable by the nav mesh, the AI would seem to bug-out and keep repeating the "rotate to face, make sound, wait" part and then restart when it reached "move to".


I found that the solution was to project the sound's location to the nav mesh, so that the AI could get as close to the sound as it could without error. Now it works perfectly.

amysmilebatto
Автор

To open debug menu, you should look at the AI.

aquagamerstr
Автор

If you're having issues with the AI going back to patrol before reaching the sense location, try going to AIController > AIPerception > AI Hearing Config > Max Age and set the value to 0.

StuffsS
Автор

My AI is always able to find me even if its lost sight of me. So once it loses sight it walks back to its patrol point as normal, but if I start walking towards the AI walking away. it will automatically turn around and start chasing me (and no I'm not walking in its hearing range). also when this happens can see the player is set to true.

amberhams
Автор

Hey, can you make a tutorial of how to add chase music, plss

phillips
Автор

I have a weird bug that I'm not sure if you have or not...basically if I stand still and the enemy comes to me he keeps going into the attack animation and then stops immediately. I think by experimenting that the problem is he constantly tries to get to my exact location so he is stuck in the parallel execution, does anyone have this problem or maybe know a workaround?

Grujadbassman
Автор

I have a random unknown stimulus in my array of "Info Last Sensed Stimuli" on the "Get Actors Perception" node. It's been populated in this array at index 1 but does not give me the name of which sense config it is when I try to print string it. Any ideas about what this random perception stimulus it could be?

lewismurphy
Автор

I didnt have any problem putting the sound in AI Tree, works perfect.

MegaAgiri
Автор

Great! Can you make the AI communicate with each other as well? So if one AI sees the player, it will call for help and more will come looking for the player :D

JoeTheSpaceGuy
Автор

8:49 *The info output is the sense so it has to be broken*

kingades
Автор

Dood you are the man, your tutorials are great!
Keep it up :)

Aiden-wguf