tinjaw
New Member
Posts: 6
Posts: 6
|
Post by tinjaw on May 22, 2016 15:53:01 GMT
I've had MA for over a year, knowing that someday I would need it. That day has come.
What I want to do is have a box collider as a trigger; and when the player triggers it, I want a telephone, in a different location, to ring. What are the basic steps I need to take? I'll then RTFM on the details.
Thanks
|
|
|
Post by DarkTonic Dev on May 22, 2016 17:37:27 GMT
Easiest way: fire a Custom Event from the trigger and put a Custom Event Listener at the other location. So you'll need to create a Sound Group to play the sound effect (create it in edit mode), and create the Custom Event in the Master Audio game object as well, then you can use the EventSounds component to both fire and listen for the Custom Event and play the sound.
|
|
tinjaw
New Member
Posts: 6
Posts: 6
|
Post by tinjaw on May 24, 2016 1:55:16 GMT
I have got things kind of working. The telephone rings, but it doesn't sound like 3D sound or occlusion is working properly. I tried to make a video. The voice over isn't good, but if you listen and watch where the player is you will see what has got me confused. When I walk in the kitchen the phone is the loudest and the clearest. As if it was in the kitchen. When I approach the phone in the hallway occlusion kicks in even though there is a clear LOS. As I approach the phone, the ringing gets softer and actually disappears. screencast.com/t/aCeK78FYWNL
|
|
|
Post by DarkTonic Dev on May 24, 2016 2:07:32 GMT
Have you read how the occlusion works (distance / frequency) on the docs website? Anyway, if the occlusion line is red then it is in fact occluded, whether you were able to find the blocker or not in 5 seconds. You will need to look into finding what's blocking the ray cast by disabling and enabling things in the Scene. I won't be able to help by watching a video because I can't go poke around in the Hierarchy.
|
|
tinjaw
New Member
Posts: 6
Posts: 6
|
Post by tinjaw on May 25, 2016 1:09:55 GMT
After experimentation it appears that many things are causing the occlusion -- to include capsule colliders on the character and the Character Controller component as well.
|
|
|
Post by DarkTonic Dev on May 25, 2016 1:22:12 GMT
Right, you will need to set the Occlusion Layer Mask correctly so the character doesn't block things that he's supposed to hear. That may involve changing the layers of certain objects to get it working correctly.
|
|
tinjaw
New Member
Posts: 6
Posts: 6
|
Post by tinjaw on May 25, 2016 1:39:27 GMT
I understand things better after your help. Thanks.
|
|
|
Post by DarkTonic Dev on May 25, 2016 1:46:35 GMT
No problem!
|
|