AActor::DispatchBlockingHit
#include "GameFramework/Actor.h"
Access: public
Description
Calls ReceiveHit on this actor and fires the OnComponentHit delegate on the blocking component. Called internally by movement code when a sweep is blocked.
Caveats & Gotchas
- • Do not call this manually in game code — it is part of the movement pipeline and is expected to be called once per blocking sweep step. Calling it arbitrarily will fire hit notifications without an actual physics contact.
- • This dispatches to both the actor-level ReceiveHit/NotifyHit and the component-level OnComponentHit delegate. If you only need the component event, bind to the component delegate directly rather than overriding this.
Signature
ENGINE_API void DispatchBlockingHit(UPrimitiveComponent* MyComp, UPrimitiveComponent* OtherComp, bool bSelfMoved, FHitResult const& Hit) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| MyComp | UPrimitiveComponent* | The component on this actor that was blocked. | — |
| OtherComp | UPrimitiveComponent* | The component on the other actor that caused the block. | — |
| bSelfMoved | bool | True if this actor was the mover. | — |
| Hit | FHitResult const& | The hit result describing the blocking contact. | — |
Return Type
void Example
Internal engine usage (do not call manually) C++
// The engine calls this internally during sweep-based movement:
// UPrimitiveComponent::MoveComponent -> DispatchBlockingHit
// You respond to it by overriding NotifyHit() or binding OnComponentHit:
MyMeshComp->OnComponentHit.AddDynamic(this, &AMyActor::OnHit); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?