Sound attached to a moving actor never plays

Ok, so I got this scenario where I am spawning a plane randomly (50000-70000 units away from the player). It is given a direction and a velocity towards the player position It only moves across XY plane and does not head straight towards the player, only passed above it. Finally, it is given a height of 5000 units.

Now, I am attaching a sound to the plane but offsetting it by -5000 Z. So that the sound attenuates correctly. I have tried attaching the sound in the blueprint after spawning the actor, like this:


image

And I have tried fixing the sound to the plane in the viewport of the actor class itself, like this:

The sound plays fine when attenuation is off or funnily, when the attenuation outer radius is cranked to absurdly high levels.

And to confirm that the sound actually plays near the player, I have paused the level when the plane is spawned and reached right above the player and you can see the attenuation circles surrounding the player:

:smiling_face_with_tear: Anyone?

This topic has been moved from International to Programming & Scripting.

When posting, please review the categories to ensure your topic is posted in the most relevant space. Hopefully, this category change helps you to get the answers you’re looking for :slight_smile:

1 Like

Hey there @CoDrift1! This is one of those ideas that gets easier to fake instead of simulate. The sound is likely being culled when attached to the plane, as it’s root is far outside of the range where it should matter. When it comes to larger distances like this, you start to run into limitations. There’s a number of ways to get around this, but before going into them I can probably focus in on your use case. Is the plane audio just ambience or is it part of a game mechanic? (The sub-question is how accurate do you require this to be?)

1 Like

If CoDrift doesn’t respond, I may hijack your support, because I have a similar issue with a train system I created. If the player is near the train already, no problem, but if the player is far away from the train, and then the train and the player get close, the noise the train is supposed to be making as it moves through the level (grinding rail sounds, engine sounds, etc.) is culled.

For now, I’ve ignored it, but if there are any tips?

Hey there @Leomerya12! For a client, they wanted positional audio for objects entering an area a large distance away for gameplay purposes. I am by no means well versed in audio, but what I did is I created a new class type to do long range audio, where it basically spawned an object under the root of the player, then offset the audio source 100 units forward, then rotated that towards the actor that spawned it. Then taking a measure of distance setting some audio settings. Unfortunately I don’t have access to that project any longer to get a good example without rewriting it. This was back in 4.27 as well, so there may be better options for global audio.

1 Like

Try adjusting the fall of distance?

1 Like

Correct, in that that’s what I’m doing now, but the level is quite large, and if my CPU doesn’t need to process sounds happening on the other side of the map, I’d rather avoid it, even if the impact is minimal.


Brilliant idea!

It’s a fun little trick I to avoid culling, I had to use when working on a space based game where many things are “To Scale Simulation” and faking most systems was the only way anything was feasible.