- Home /
How to make 2D object trigger a sound once each time it passes 2D player in 3D game?,I want to play a sound once each time passes near my player
First of all, it is a 3D game, but player is 2D sprite as well as object that should trigger the sound.
I don't want the sound to loop but want it to play each time object passes near player.
I have tried creating 3D collider on a object, and attaching simple script to it, and it works fine, sound plays only once but the 3D collider is pushing my character controler when player is idle. Player can pass through it but when idle it is being pushed.
I have reviewed all "how to play sound once" but they are either for 2D game or destroy gameobject after playing sound concept.
I need 2D sprite passing my 2D character in 3D game with character controller to play sound once without loop, and over again each time it passes near my player.
Please help!
Your answer
Follow this Question
Related Questions
Need help making an audio trigger. 2 Answers
Detect if out of trigger 2 Answers
Can't click gameobject when over another trigger? 1 Answer
animation and sound on collide 1 Answer
Restart sound when re-entering trigger? 2 Answers