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.
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.