#ue4 - Fix blocking hits dispatched from FScopedMovementUpdate() being dispatched when collision response has changed (from overlaps or other blocking hits).

[CL 2576414 by Zak Middleton in Main branch]
This commit is contained in:
Zak Middleton
2015-06-03 19:04:11 -04:00
committed by Zak.Middleton@epicgames.com
parent ad60a7df56
commit 588f95c47e
@@ -514,7 +514,11 @@ void USceneComponent::EndScopedMovementUpdate(class FScopedMovementUpdate& Compl
UPrimitiveComponent* PrimitiveThis = CastChecked<UPrimitiveComponent>(this);
for (const FHitResult& Hit : CurrentScopedUpdate->BlockingHits)
{
PrimitiveThis->DispatchBlockingHit(*Owner, Hit);
// Collision response may change (due to overlaps or multiple blocking hits), make sure it's still considered blocking.
if (PrimitiveThis->GetCollisionResponseToComponent(Hit.GetComponent()) == ECR_Block)
{
PrimitiveThis->DispatchBlockingHit(*Owner, Hit);
}
}
}
}