# Sound Occlusion always originates from actor instead of componet

**URL:** <https://qa.fmod.com/t/sound-occlusion-always-originates-from-actor-instead-of-componet/21372>\
**Category:** Unreal Engine\
**Created:** [March 15, 2024, 3:19pm UTC](https://qa.fmod.com/t/sound-occlusion-always-originates-from-actor-instead-of-componet/21372 "2024-03-15T15:19:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nordic](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@nordic](https://qa.fmod.com/u/nordic)\
**Post date:** [March 15, 2024, 3:19pm UTC](https://qa.fmod.com/t/sound-occlusion-always-originates-from-actor-instead-of-componet/21372/1 "2024-03-15T15:19:54Z")

</div>

Hi there,

It seems like a bug in the UFMODAudioComponent but I want to ask if there are other reason for it.

Inside UFMODAudioComponent::UpdateAttenuation() you will find this code:

```
// Use occlusion part of settings
if (OcclusionDetails.bEnableOcclusion && bApplyOcclusionParameter)
{
    static FName NAME_SoundOcclusion = FName(TEXT("SoundOcclusion"));
    FCollisionQueryParams Params(NAME_SoundOcclusion, OcclusionDetails.bUseComplexCollisionForOcclusion, GetOwner());

    const FVector &Location = GetOwner()->GetTransform().GetTranslation();
    const FFMODListener &Listener = GetStudioModule().GetNearestListener(Location);

    bool bIsOccluded = GWorld->LineTraceTestByChannel(Location, Listener.Transform.GetLocation(), OcclusionDetails.OcclusionTraceChannel, Params);

```

It always grabs the owning actor location as a start for the line trace.  
It is possible via anim notifies, via PlayEventAttached or in the component itself to attach it on a bone. The component is properly moved with it and updated. but the trace always starts from the actor position.

I checked in our current used version 2.02.18 but that code is the same also in newer versions.

I have fixed for use but maybe it is worth changing it for future verisons

cheers Stefan

---

<div class="post-metadata">

**Author:** ![Andrew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/andrew/32/261_2.png) [@Andrew](https://qa.fmod.com/u/Andrew)\
**Post date:** [March 18, 2024, 2:36am UTC](https://qa.fmod.com/t/sound-occlusion-always-originates-from-actor-instead-of-componet/21372/2 "2024-03-18T02:36:44Z")

</div>

Thanks Stefan. This issue is already in our tracker and we should have a fix for it soon.
