Ron Kiker (rkiker)

1 answer · asked · Lesson: Ejecting Bullet Shells · Course: Fundamentals of Weapon Mechanics in Unity

I commented out the shellClip.Play() and turned on Awake on the AudioSource for the BulletShell ...which is giving the exp...

I commented out the shellClip.Play() and turned on Awake on the AudioSource for the BulletShell ...which is giving the expected behavior. Not sure if that should be the actual behavior though...will return back to this as i work through the courses
  • crew
    Commenting out that line means you have to manually turn on the audio source which kind of defeats the point. It'll play the audio right when the bullet shell is instantiated. Note that you may have issues on the audio clip working dependent on the collider it's hitting. Sometimes very small colliders, such as those on the bullet shell, seem to fall through thin colliders like that on a plane. Try using a box collider in the area where the shells would fall.