UDamageType

A DamageType is intended to define and describe a particular form of damage and to provide an avenue for customizing responses to damage from various sources.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

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

Include

#include "GameFramework/DamageType.h"

Syntax

class UDamageType : public UObject

Remarks

A DamageType is intended to define and describe a particular form of damage and to provide an avenue for customizing responses to damage from various sources.

For example, a game could make a DamageType_Fire set it up to ignite the damaged actor.

DamageTypes are never instanced and should be treated as immutable data holders with static code functionality. They should never be stateful.

Variables

Name Description

Public variable

uint32: 1

 

bCausedByWorld

True if this damagetype is caused by the world (falling off level, into lava, etc).

Public variable

uint32: 1

 

bRadialDamageVelChange

When applying radial impulses, whether to treat as impulse or velocity change.

Public variable

uint32: 1

 

bScaleMomentumByMass

True to scale imparted momentum by the receiving pawn's mass for pawns using character movement

Public variable

float

 

DamageFalloff

Damage fall-off for radius damage (exponent). Default 1.0=linear, 2.0=square of distance, etc.

Public variable

float

 

DamageImpulse

The magnitude of impulse to apply to the Actors damaged by this type.

Public variable

float

 

DestructibleDamageSpreadScale

How much the damage spreads on a destructible mesh

Public variable

float

 

DestructibleImpulse

How large the impulse should be applied to destructible meshes

Constructors

Name Description

Public function

UDamageType

(
    const FObjectInitializer& ObjectIn...
)

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