Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Audio "Play At Location" triggers when player enters radius, long after trigger.

For some reason when I play audio through "Play At Location" in Blueprint it does NOT actually play itself if i am outside of the attenuation radius, unless I later enter the radius of the attenuation effect. The audio should have already ended long ago.

I have been unable to find any properties related to this. It creates a time rift where a player passing by something that happened a while ago, will have the audio file playing for him much later.

Product Version: Not Selected
more ▼

asked Aug 21 '14 at 02:53 AM in Bug Reports

avatar image

Tom Looman
469 35 88 55

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I'm afraid there are no 'virtual' sounds in Unreal, allowing sounds to play in the background if unheard. Any sound that's asked to play will be queued up and wait to start until the system determines that its volume would be greater than 0. As a way to workaround this I would advise performing a distance check before playing the sound and if you are currently outside of the attenuation radius then don't play the sound at all.

more ▼

answered Aug 21 '14 at 09:25 AM

avatar image Tom Looman Aug 21 '14 at 03:42 PM

Thanks for your answer. I see why this works the way it does. But I do wonder why this is not a problem for ShooterGame that seems to call play sound in C++ for weaponfire etc. but never suffer from ghosting when you do come back into the other player's radius. (The code I inspected used PlaySoundAttached)

avatar image IdentityCrisisUK STAFF Aug 21 '14 at 04:43 PM

I can have a look to be sure, I'm not sure if that takes a similar approach internally or if it's something taken care of by replication in multiplayer.

avatar image stfx Sep 19 '14 at 10:17 AM

This sounds like a major issue to me. Doing a distance check for every sound in the game is slow and unnecessary especially since sounds do them anyway. An actual usable workaround I found is to set bAlwaysPlay to true by using a soundclass. But soundclasses can only be assigned over soundcues so you need to add soundcues for every sound in the game which is also quite unnecessary. I am also pretty sure that this is not ideal performance wise either. So please rethink adding virtual sounds to UE4 to make life easier for everyone. Thanks.

avatar image IdentityCrisisUK STAFF Sep 19 '14 at 10:40 AM

I wouldn't say a single distance check before playing a sound is slow, it's different from calculating a distance to apply attenuation etc.

The thing with setting bAlwaysPlay is that it's kind of the opposite of virtualisation, if you aren't in hearing range you are still using up a sound channel. It's generally reserved for sounds the player must hear like a mission objective dialogue or background music. You can also set bAlwaysPlay on an audio component, though only from code atm.

Rest assured we would really like to add virtual sounds but I think it would likely come with a large re-write of how the audio system is set up to cover a lot of issues at the same time.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question