Download

Sound wont continue to play when a projectile is colliding with NPC

I currently have a projctile class I wrote in c++ that is used for bullets and I am trying to set up sound effects for whenever it is spawned.

I have the following code:

This allows the sound effect to play whenever the projectile is spawned, and I the only issue I am having is when the projectile collides with an object. Whenever the projectile collides with an object, I can’t hear the sound anymore.

I am wondering if it is because the sound is attached to the root component, so when the bullet overlaps with the npc you just can’t hear it, or if it is being destroyed early, but I have the bStopWhenOwnerDestroyed set to false.

Update:
I guess the bStopWhenOwnerDestroyed boolean does not apply to the bAutoActivate.

So to get it to work I now have the following:

And then play the sound where I spawn the actor