Search Unity

Question How can I make bullet impact sounds?

Discussion in 'Audio & Video' started by AGENT_KEL, Mar 12, 2023.

  1. AGENT_KEL

    AGENT_KEL

    Joined:
    Jan 24, 2023
    Posts:
    17
    At first I thought that would be easy but then I've encountered a problem with my bullet projectile being destroyed before triggering any sound. Is there a way to make my bullet to play a sound after colliding with an object and being destroyed?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    Spawn an audiosource (and pool it for better performance) and have it disable/destroy itself after it's done using a coroutine
     
    AGENT_KEL likes this.