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.