UAudioComponent::OcclusionCheckInterval
#include "Components/AudioComponent.h"
Access: public
Specifiers: UPROPERTYconfig
Description
How often, in seconds, the engine re-tests line-of-sight occlusion for this component's sound while it is playing. A negative value checks occlusion only once, at playback start.
Caveats & Gotchas
- • This property is not marked EditAnywhere or BlueprintReadWrite, so it can't be tweaked per-instance in the editor or Blueprint — it's a config-driven value meant to be set via .ini, or written directly from C++ before Play().
- • Occlusion checking itself only runs if the sound's attenuation settings have occlusion enabled (bEnableOcclusion); setting this interval has no effect otherwise.
- • Frequent occlusion checks (small interval, many concurrent sounds) cost line traces every tick — tune this up for background/ambient sounds where occlusion accuracy matters less than performance.
Signature
float OcclusionCheckInterval Example
Widen the occlusion re-check interval from C++ C++
AudioComponent->OcclusionCheckInterval = 0.5f;
AudioComponent->Play(); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?