Hi there, I’m trying to create a BP that will have a spatialized fmod sound within it, that is always trying to get to the players location, but is constrained by a 3D volume.
Similar to moving the emitter along a spline, but I can’t seem to find a replacement for the “Find Location Closest to World Location” that spline components have.
Any help appreciated!
here’s a shot of my spline version and the part i’m trying to replace
Just so I understand exactly what you’re going for, can I get you to elaborate on the full behavior of the blueprint/event in relation to the player? For example, what is intended audio behaviour when the player is outside vs inside the volume?
The intended behaviour is for the emitter to snap to the players location within the volume, and snap to the closest point to the player, when the player is outside the volume. So combining that with the pan override the sound can be 2D within and Spatialized outside. For example I could drop a cube on an area of forest, so the player can hear the forest as they approach, and once inside are surrounded by it.
I’ve managed to solve this, so anyone else that may come across looking for the same thing: There is an equivalent node called “Get Closest Point on Collision” which seems to do exactly what I want it to do, and can be used with a collision box, sphere, or capsule
The “Out point on body” is then used to set the location of the fmod component every Nths of a second
Though if there is an even simpler ways of achieving this, I’m all ears.
What you’ve implemented is likely how I’d consider solving this specific problem. Another hypothetical way to do it would be to automate either the centered 2D pan mix or (in 2.03) the wet/dry of the event’s spatializer based on a built-in distance parameter, in order to effectively disable spatialization when within a certain distance of the listener.