Can Hear Object no target

Hiiyan90

New member
Hello.

I had purchased the movement pack for behaviour designer and have updated to the latest versions and integration but the AI does not seem to hear the target. It does not work in the behaviour designer/TPC integration demo either no matter what I try. Watching it in the editor during play, nothing happens when in the hearing radius. Everything else seems to work. I have tried changing the tags and even setting as a target but it does not respond.

Thank you.
 
Are you referring to the Can Hear Object sample in the Movement Pack demo scene?
 
No sorry. The behavior designer/TPC demo which requires the movement pack. With agent Nolan as the AI. It does not work there or in my own project with my own AI.

I can reproduce in a fresh project running the demo. Can run around behind agent nolan, shoot and run and he will not react. This is in both the shooter and melee demo. Looking in the BD editor during play there is no target being assigned either.

I suppose I am just trying to see if it's a bug or error on my end.

Thank you.
 
Last edited:
I was having the same issue where even shooting near the ai doesn't seem to have any affect on the can hear object task but when i set the audibility threshold to 0 seem to work for weapons when i am using object layer mask to detect but foot steps doesn't seem to work, but when i add both feet in the target objects array, it detect the footstep audio but then it can not detect weapons unless i add all the weapons in the target object array as well then it will work for both weapons and foot step.

Having weapons in the target objects array doesn't seem to be the best solution if you are gonna have runtime pickups
 
I will look into a better solution for this situation. Right now using GetComponentsInChildren should work but it's not very performant.
 
Thanks for the link! I will try it out this weekend. Thanks a lot :D
Hey friend, did you ever get yours to work?

The fix provided made it possible for the AI to hear my footsteps but it is still not picking up weapon firing sounds.
 
Can hear object also does not work for me, does not react to any sounds of the character. But it reacts to the sound of opening / closing the door.
 
@Justin and others...

I discovered something hindering the effectiveness of the AI CanHear.

I assume most people are testing with demo, or otherwise likely have AI on a Patrol/Waypoint route whilst trying to get 'CanHear' to work properly.

Based on sometimes my AI seemingly arriving at waypoints and only then turning and moving towards my players, I decided to disable the waypoints.

This seems to allow the AI to wait about 2 seconds, and then immediately start walking towards the Player's sound, and it works for me for BOTH footsteps AND firing, and even reloading!

So Justin is there something we need to do to make the character prioritise the CanHear over waypointing/patrolling perhaps?

----
Also I have this weird thing happening where my AI wants to target his own Pelvis and Thigh bones for some reason. It results in some strange walking in circles moments as well as just buggy behaviour overall. SOmetimes interrupts the search for player noise.

See GIF https://gyazo.com/70ca8c61e3fc5d508d9fe07e7840790a
 
Last edited:
Also wondering how to implement 'Silenced' weapons whereby the output volume or other status of a sound/audio source might alter it's likelihood of being heard?
 
With the integration tree the Can Hear Object task will reevaluate when the patrol task is running so there shouldn't need to be anything else that you need to do.

Also wondering how to implement 'Silenced' weapons whereby the output volume or other status of a sound/audio source might alter it's likelihood of being heard?
I would subclass the ShootableWeapon component and have it apply a different volume to the audio source.
 
With the integration tree the Can Hear Object task will reevaluate when the patrol task is running so there shouldn't need to be anything else that you need to do.


I would subclass the ShootableWeapon component and have it apply a different volume to the audio source.
I'll try to track what it's doing. But appears to be ignoring hearing things until reaching a waypoint.

**Edited, created new post for Ai detecting own bones
 
Last edited:
Top