UCharacterMovementComponent::NotifyBumpedPawn
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtualoverride
Description
Called when this character bumps into another pawn during movement, and resets the RVO avoidance lock timer so the two pawns don't stay stuck avoiding each other.
Caveats & Gotchas
- • Draws a debug line for a couple of seconds in non-shipping/test builds when avoidance debug drawing is enabled for this component's AvoidanceUID.
- • Only affects AvoidanceLockTimer — it does not itself apply any physical response to the bump (no impulse, no push); that's handled elsewhere in collision resolution.
Signature
virtual void NotifyBumpedPawn(APawn* BumpedPawn) override Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| BumpedPawn | APawn* | The other pawn that was bumped into. | — |
Return Type
void Example
Reacting to pawn bumps C++
void UMyCharacterMovementComponent::NotifyBumpedPawn(APawn* BumpedPawn)
{
Super::NotifyBumpedPawn(BumpedPawn);
OnPawnBumped.Broadcast(BumpedPawn);
} Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?