UAudioComponent::AutoAttachRotationRule
#include "Components/AudioComponent.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWrite
Description
Controls how this component's rotation is handled when it auto-attaches to AutoAttachParent, if bAutoManageAttachment is true.
Caveats & Gotchas
- • Only takes effect when bAutoManageAttachment is enabled.
- • For non-spatialized or omnidirectional sounds, rotation rarely matters audibly, so this is mostly relevant for directional/attenuated sound sources.
Signature
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Attachment, meta = (EditCondition = "bAutoManageAttachment"))
EAttachmentRule AutoAttachRotationRule; Example
Snap to the socket on auto-attach C++
AudioComponent->bAutoManageAttachment = true;
AudioComponent->AutoAttachLocationRule = EAttachmentRule::SnapToTarget;
AudioComponent->AutoAttachRotationRule = EAttachmentRule::SnapToTarget;
AudioComponent->AutoAttachScaleRule = EAttachmentRule::KeepWorld; See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?