UCharacterMovementComponent::SetGroupsToAvoid
Deprecated: Please use SetGroupsToAvoidMask function instead.
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Sets the mask of avoidance groups this character should actively avoid, using a raw bitmask integer.
Caveats & Gotchas
- • Deprecated in favor of SetGroupsToAvoidMask(const FNavAvoidanceMask&); the int32 overload is scheduled for removal.
- • GroupsToIgnore takes priority over this — a group flagged in both is treated as ignored, not avoided.
Signature
void SetGroupsToAvoid(int32 GroupFlags) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| GroupFlags | int32 | Raw bitmask of the avoidance group(s) this character should actively avoid. | — |
Return Type
void Example
Legacy group-to-avoid assignment (prefer the mask overload) C++
GetCharacterMovement()->SetGroupsToAvoid(1 << 1); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?