Hello,
I have an AudioComponent, location of which is updated in the world at every tick. It uses a Sound Attenuation file because both attenuation & spatialization are required for the audio effect. Problem is: when AudioComponent is moved to a new location, I can see that the component is there, but the sound is hearable there 1-2 seconds later.
More details:
Audio is of a laser beam. It represents enemy laser beam’s impact on the player.
Then I do a linetrace from the enemy to a forward direction. If the trace is blocked by player, I set the location there. Otherwise location is at the end of the trace (far away). Normally everything works in static position. When I drag pawn to the right (so that trace no longer touches it) and then bring it back again (touches again), the sound near player will play 1-2 seconds later. I am certain that the component’s location is correct - I attached a mesh to verify in runtime that there is no issue in the location.
I believe the audiocomponent takes some time to update its attenuation parameters, and doesn’t react immediately to the location changes.
Has anybody encountered anything like that? I would appreciate any recommendations.
UE 5.1