Lecture 148
Play/Stop when the shooting starts
if (FireAudioComponent)
{
    IsActive ? FireAudioComponent->Play() : FireAudioComponent->Stop();
}must be replaced with SetPaused (bool):
if (FireAudioComponent)
{
    FireAudioComponent->SetPaused(!IsActive);
}After calling the Stop method of the component, a deattach occurs from the parent component. As a result, the world coordinates of the sound component will no longer be updated according to the position of the weapon's mesh socket.
Last updated
Was this helpful?