Howdy, would anybody be able to tell me how adapt my existing script so that an Audio-Clip will play on the ray cast collision. I've spent all day butchering my existing code trying to achieve this but I've got nowhere with it. Here it is in working order, minus any audio elements:
Any suggestions on how to achieve this will be greatly appreciated, Will.
asked May 02 '10 at 07:53 PM
Read the AudioSource script reference.
Add an Audio Source component to the object you want to emit the sound from. Then, reference the Audio Source from your code, and call the function
answered May 02 '10 at 08:25 PM