How to create impact sounds?

Hi,

This is the first time i am using the Unity dev kit. I am a sound designer.

Now the question -
How to create impact sounds in Unity ? I searched a bit but could not find an answer.

What i am trying to do is add a sound to the barrel when player fires the gun at it.

*What i ended up doing is this (which is not what i want) -
unity_test

Please check the attachment.alt text

Or the pic - http://i47.tinypic.com/2wqcy6e.jpg

  • Thanks.

http://unity3d.com/support/documentation/Manual/Sound.html

http://unity3d.com/support/documentation/Components/class-AudioListener.html

http://unity3d.com/support/documentation/Components/class-AudioSource.html

http://unity3d.com/support/documentation/ScriptReference/AudioSource.html

http://www.unity3dstudent.com/2010/07/beginner-b10-audio-basics/

http://www.youtube.com/watch?v=fIGEPFjm4xQ

http://www.gameaudio101.com/Unity-Audio-Tips.php

You’ll need to instantiate a sound at the collision point of the raycast.

If you look at how the shooting code works you’ll see there is a Physics.Raycast call. The 3rd argument in that function is usually tied to a variable of type RaycastHit. That RaycastHit variable will give you the position of the collision. And that’s where you need to instantiate the sound.

I’d just give you the code for it, but then you wouldn’t really learn anything.

@Jay Kay

Thank you for that and i actually watched that JDAMS video before posting this. I applied that to my project but what it does it Play a sound when player “touches” the object.

But what i am trying to create is impact (or collision in unity terms?) sounds. the impact is supposed to be the bullet which the player fires at the object.