# Get Source/Listener positions in FMOD plugin for UE4

**URL:** <https://qa.fmod.com/t/get-source-listener-positions-in-fmod-plugin-for-ue4/12411>\
**Category:** Unreal Engine\
**Created:** [March 28, 2016, 7:16am UTC](https://qa.fmod.com/t/get-source-listener-positions-in-fmod-plugin-for-ue4/12411 "2016-03-28T07:16:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![udit034](https://avatars.discourse-cdn.com/v4/letter/u/85e7bf/32.png) [@udit034](https://qa.fmod.com/u/udit034)\
**Post date:** [March 28, 2016, 7:16am UTC](https://qa.fmod.com/t/get-source-listener-positions-in-fmod-plugin-for-ue4/12411/1 "2016-03-28T07:16:30Z")

</div>

I am using FMOD\_UE4\_Tutorials\_Map in Unreal Engine 4 with FMOD 1.07.07

Similar to the fmod\_distance\_filter sample plugin provided in the API, I am trying to write my own plugin that gets source/listener position when a 3D event such as grenade explosion takes place.

Is there any way to get this data ?  
Also, when is the FMOD\_DistanceFilter\_dspsetparamdata callback triggered?

---

<div class="post-metadata">

**Author:** ![geoff](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@geoff](https://qa.fmod.com/u/geoff)\
**Post date:** [March 29, 2016, 12:04am UTC](https://qa.fmod.com/t/get-source-listener-positions-in-fmod-plugin-for-ue4/12411/2 "2016-03-29T00:04:34Z")

</div>

Using the distance filter is a good example to start from. The function FMOD\_DistanceFilter\_dspsetparamdata is part of the FMOD\_DSP\_DESCRIPTION, so it is called by FMOD when a data parameter is set into the DSP.

If you place the plugin on the master track of an event, and if the DSP has declared a FMOD\_DSP\_PARAMETER\_DATA\_TYPE\_3DATTRIBUTES parameter, then FMOD Studio will update the 3d position into the DSP when the emitter or listener moves.

The data type that is passed in is documented here:  
[http://www.fmod.org/documentation/#content/generated/FMOD\_DSP\_PARAMETER\_3DATTRIBUTES.html](http://www.fmod.org/documentation/#content/generated/FMOD_DSP_PARAMETER_3DATTRIBUTES.html)

It doesn’t provide the listener orientation, but it does have both the absolute and relative position of the emitter (compared to the listener).

If you want to support multiple listeners, you can declare the type FMOD\_DSP\_PARAMETER\_DATA\_TYPE\_3DATTRIBUTES\_MULTI instead. Then you will receive this structure passed to the callback:  
[http://www.fmod.org/documentation/#content/generated/FMOD\_DSP\_PARAMETER\_3DATTRIBUTES\_MULTI.html](http://www.fmod.org/documentation/#content/generated/FMOD_DSP_PARAMETER_3DATTRIBUTES_MULTI.html)

That structure contains all relative orientation for all listeners.

---

<div class="post-metadata">

**Author:** ![udit034](https://avatars.discourse-cdn.com/v4/letter/u/85e7bf/32.png) [@udit034](https://qa.fmod.com/u/udit034)\
**Post date:** [March 29, 2016, 9:35am UTC](https://qa.fmod.com/t/get-source-listener-positions-in-fmod-plugin-for-ue4/12411/3 "2016-03-29T09:35:05Z")

</div>

> [@](#):
>
> Using the distance filter is a good example to start from. The function FMOD\_DistanceFilter\_dspsetparamdata is part of the FMOD\_DSP\_DESCRIPTION, so it is called by FMOD when a data parameter is set into the DSP.
> 
> If you place the plugin on the master track of an event, and if the DSP has declared a FMOD\_DSP\_PARAMETER\_DATA\_TYPE\_3DATTRIBUTES parameter, then FMOD Studio will update the 3d position into the DSP when the emitter or listener moves.
> 
> The data type that is passed in is documented here:  
> [http://www.fmod.org/documentation/#content/generated/FMOD\_DSP\_PARAMETER\_3DATTRIBUTES.html](http://www.fmod.org/documentation/#content/generated/FMOD_DSP_PARAMETER_3DATTRIBUTES.html)
> 
> It doesn’t provide the listener orientation, but it does have both the absolute and relative position of the emitter (compared to the listener).
> 
> If you want to support multiple listeners, you can declare the type FMOD\_DSP\_PARAMETER\_DATA\_TYPE\_3DATTRIBUTES\_MULTI instead. Then you will receive this structure passed to the callback:  
> [http://www.fmod.org/documentation/#content/generated/FMOD\_DSP\_PARAMETER\_3DATTRIBUTES\_MULTI.html](http://www.fmod.org/documentation/#content/generated/FMOD_DSP_PARAMETER_3DATTRIBUTES_MULTI.html)
> 
> That structure contains all relative orientation for all listeners.

This was very helpful.  
Thanks!
