UCharacterMovementComponent::SetAvoidanceGroupMask
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Sets which RVO avoidance group this character belongs to, used by the avoidance system to filter which neighboring agents are relevant to it.
Caveats & Gotchas
- • Assigning the AvoidanceGroup property directly does not re-register the group with the avoidance manager — this function is required for the change to take effect.
- • Has no observable effect unless avoidance is enabled via SetAvoidanceEnabled(true).
Signature
void SetAvoidanceGroupMask(const FNavAvoidanceMask& GroupMask) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| GroupMask | const FNavAvoidanceMask& | The avoidance group mask this character should belong to. | — |
Return Type
void Example
Assign this character to an avoidance group C++
GetCharacterMovement()->SetAvoidanceGroupMask(FNavAvoidanceMask(1 << 2)); See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?