- Home /
Audio trigger when FPS walks into things, walls, doors etc
Hi there,
Pretty new to Unity and I'm trying to trigger audio, for example a wooden door sound when my FPS walks into it as a one shot. I've tried a few scripts but I can't seem to get it working.
What I've tried:
Add box collider to the object and add an OnCollisionEnter script with the audio source added.
Added audio directly to the building and put a collision script on the FPS.
The question is, what do I add where? Do I add an audio source to the building and tell the FPS what to do. Or am I meant to add a box collider so that when my FPS walks into the area it triggers a one shot?
Sorry, only working with Unity a short time, if this is a bit silly/simple, I understand!
Hope someone can help!
:)
Your answer
Follow this Question
Related Questions
How do I use colliders and/or triggers to end the game? 1 Answer
2D - Two objects, each having two trigger colliders - interacting 0 Answers
Does OnTriggerStay don't detect a collision with a non-trigger collider? 1 Answer
How to single out specific colliders from another object 1 Answer
How do I prevent multiple triggers using OnTriggerEnter? 1 Answer