Can hear object

Simon.m

New member
First of all, i have almost zero knowledge on coding. I cant make "can hear object" work. i have seen the other posts around the internet about it but still...
I set the audio source 3d ,linear and the radius half the distance from the agent. I want to make the agent wander until hears the audio source...
Please, I need your help!
 

Attachments

  • Screenshot 2020-11-22 at 16.09.48.png
    Screenshot 2020-11-22 at 16.09.48.png
    903.1 KB · Views: 4

Simon.m

New member
I had the abort type at the wrong branch, but even when i have the can hear object alone, and inside the radius of the audio source, it doesn't hear it. I am really confused at what target object and returned object do.
 

Attachments

  • Screenshot 2020-11-23 at 17.29.09.png
    Screenshot 2020-11-23 at 17.29.09.png
    790.7 KB · Views: 5

Justin

Administrator
Staff member
Target is the object that you want to hear, and Returned Object is the object that was heard. If you have set a target then the returned object will be the same.

Your behavior tree doesn't look like it is active so it's not going to be able to determine if the target is heard. You should place an idle task to the right similar to this video:

 

Simon.m

New member
Well, i have tried things. but never got a green check. I have the red agent wander but still can't hear the blue cube which is the source and inside the radius. and hopefully i want it to move towards the purple cube. All three are prefabs. The same thing happens when i use the can see object.
 

Attachments

  • Screenshot 2020-11-26 at 03.51.13.png
    Screenshot 2020-11-26 at 03.51.13.png
    917.3 KB · Views: 4

Justin

Administrator
Staff member
Your tree looks good now. I would try changing the Audibilty Threshold or increasing the volume on the source object to try to get it to hear. You can also take a look at the Movement Pack demo scene to see the settings that it uses.
 
Top