UProjectileMovementComponent::HandleDeflection

Handle a blocking hit after [HandleBlockingHit()](API\Runtime\Engine\GameFramework\UProjectileMovementComponent\HandleBlockingHit) returns a result indicating that deflection occured.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/ProjectileMovementComponent.h

Include

#include "GameFramework/ProjectileMovementComponent.h"

Source

/Engine/Source/Runtime/Engine/Private/Components/ProjectileMovementComponent.cpp

Syntax

virtual bool HandleDeflection
(
    FHitResult & Hit,
    const FVector & OldVelocity,
    const uint32 NumBounces,
    float & SubTickTimeRemaining
)

Remarks

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.

Returns

True if simulation of the projectile should continue, false otherwise.

Parameters

Parameter

Description

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

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss