Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UProjectileMovementComponent
Description
Handle a blocking hit after HandleBlockingHit() returns a result indicating that deflection occured. Default implementation increments NumBounces, checks conditions that could indicate a slide, and calls HandleSliding() if necessary.
| Name | HandleDeflection |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/ProjectileMovementComponent.h |
| Include Path | #include "GameFramework/ProjectileMovementComponent.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Components/ProjectileMovementComponent.cpp |
virtual bool HandleDeflection
(
FHitResult & Hit,
const FVector & OldVelocity,
const uint32 NumBounces,
float & SubTickTimeRemaining
)
True if simulation of the projectile should continue, false otherwise.
Parameters
| Name | Remarks |
|---|---|
| Hit | Blocking hit that occurred. May be changed to indicate the last hit result of further movement. |
| OldVelocity | Velocity at the start of the simulation update sub-step. Current Velocity may differ (as a result of a bounce). |
| NumBounces | Number of bounces that have occurred thus far in the tick. |
| SubTickTimeRemaining | Time remaining in the simulation sub-step. May be changed to indicate change to remaining time. |
See Also
- HandleSliding()