UCharacterMovementComponent::bBaseOnAttachmentRoot
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWrite
Description
When enabled, a character based on an object stays based on that object's attachment root component instead of the specific component it was traced against.
Caveats & Gotchas
- • Changes which component is treated as the MovementBase for based-movement tracking (following the base's motion) — it doesn't change collision detection itself.
- • Useful for multi-component actors, such as a vehicle with separate collision pieces, where the character should move with the whole actor rather than just the sub-component it landed on.
Signature
bool bBaseOnAttachmentRoot = false Example
Base movement on the attachment root C++
GetCharacterMovement()->bBaseOnAttachmentRoot = true; Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?