RMS value gets influenced by collisions

Hello. I have an fmod event that has a specialized on it so that I can hear it in 3D.


The event is played by the enemy. I also have a script that retrieves the rms value of the event and that is used to scale the ripple particle scale.

float UFmod_BP_Function_Library::GetFMODInstanceRMS(UFMODAudioComponent* FMODInstance)
{
    FMOD::ChannelGroup* ChanGroup = nullptr;
    FMODInstance->StudioInstance->getChannelGroup(&ChanGroup);
    if (ChanGroup)
    {
        FMOD::DSP* ChanDSP = nullptr;
        ChanGroup->getDSP(FMOD_CHANNELCONTROL_DSP_HEAD, &ChanDSP);
        if (ChanDSP)
        {
            ChanDSP->setMeteringEnabled(false, true);
            FMOD_DSP_METERING_INFO Info = {};
            ChanDSP->getMeteringInfo(nullptr, &Info);

            return Info.rmslevel[0];
        }
    }

    return 0;
}

The ripple particles become microscopic when the player is facing away regardless if an object is infront.



What I need is the Ripples to stay the same size regardless of player rotation.

I have made a discovery. It isnt the collisions but the code that retrieves the rms value. For example return Info.rmslevel[0]; is what the player hears in the LEFT ear, but return Info.rmslevel[1]; is the RIGHT ear. So the issue now is how do I get the volume that the object is outputting regardless of how the player hears it?

Hi,

Thank you for all the information and code.

Unfortunately, I am not able to reproduce the behaviour. Would it be possible to upload the project to your profile or a stipped out version displaying the issue?