UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FDamageEvent Struct Reference

#include <DamageEvents.h>

+ Inheritance diagram for FDamageEvent:

Public Member Functions

 FDamageEvent ()
 
 FDamageEvent (FDamageEvent const &InDamageEvent)
 
virtual ~FDamageEvent ()
 
 FDamageEvent (TSubclassOf< UDamageType > InDamageTypeClass)
 
virtual int32 GetTypeID () const
 
virtual bool IsOfType (int32 InID) const
 
virtual ENGINE_API void GetBestHitInfo (AActor const *HitActor, AActor const *HitInstigator, FHitResult &OutHitInfo, FVector &OutImpulseDir) const
 

Public Attributes

TSubclassOf< UDamageTypeDamageTypeClass
 

Static Public Attributes

static const int32 ClassID = 0
 

Detailed Description

Event used by AActor::TakeDamage and related functions

Constructor & Destructor Documentation

◆ FDamageEvent() [1/3]

FDamageEvent::FDamageEvent ( )
inline

Default constructor (no initialization).

◆ FDamageEvent() [2/3]

FDamageEvent::FDamageEvent ( FDamageEvent const &  InDamageEvent)
inline

◆ ~FDamageEvent()

virtual FDamageEvent::~FDamageEvent ( )
inlinevirtual

◆ FDamageEvent() [3/3]

FDamageEvent::FDamageEvent ( TSubclassOf< UDamageType InDamageTypeClass)
inlineexplicit

Member Function Documentation

◆ GetBestHitInfo()

void FDamageEvent::GetBestHitInfo ( AActor const *  HitActor,
AActor const *  HitInstigator,
FHitResult OutHitInfo,
FVector OutImpulseDir 
) const
virtual

This is for compatibility with old-style functions which want a unified set of hit data regardless of type of hit. Ideally this will go away over time.

Reimplemented in FPointDamageEvent, and FRadialDamageEvent.

◆ GetTypeID()

virtual int32 FDamageEvent::GetTypeID ( ) const
inlinevirtual

Reimplemented in FPointDamageEvent, and FRadialDamageEvent.

◆ IsOfType()

virtual bool FDamageEvent::IsOfType ( int32  InID) const
inlinevirtual

Reimplemented in FPointDamageEvent, and FRadialDamageEvent.

Member Data Documentation

◆ ClassID

const int32 FDamageEvent::ClassID = 0
static

ID for this class. NOTE this must be unique for all damage events.

◆ DamageTypeClass

TSubclassOf<UDamageType> FDamageEvent::DamageTypeClass

Optional DamageType for this event. If nullptr, UDamageType will be assumed.


The documentation for this struct was generated from the following files: