x


Activate audio clip when in range

I want to have an audio clip activated when I get within a certain range, but I have no idea whether that takes a custom script or if I can do it with out a script.

more ▼

asked Feb 25 '12 at 08:49 PM

jeremy gravatar image

jeremy
31 11 22 23

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

The simplest way would be to create a Sphere Collider around the object with the radius being the distance that you wanted it activated at. Set it to a trigger, and then put your code for firing the audio event within the OnTriggerEnter code block.

more ▼

answered Feb 25 '12 at 08:49 PM

dannyskim gravatar image

dannyskim
3.9k 5 7 19

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1027
x71

asked: Feb 25 '12 at 08:49 PM

Seen: 379 times

Last Updated: Feb 25 '12 at 08:49 PM