Navigation
Unreal Engine C++ API Reference > Runtime > Engine > GameFramework
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UDamageType
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
Type | Name | Description | |
---|---|---|---|
![]() |
uint32: 1 | bCausedByWorld | True if this damagetype is caused by the world (falling off level, into lava, etc). |
![]() |
uint32: 1 | bRadialDamageVelChange | When applying radial impulses, whether to treat as impulse or velocity change. |
![]() |
uint32: 1 | bScaleMomentumByMass | True to scale imparted momentum by the receiving pawn's mass for pawns using character movement |
![]() |
float | DamageFalloff | Damage fall-off for radius damage (exponent). Default 1.0=linear, 2.0=square of distance, etc. |
![]() |
float | DamageImpulse | The magnitude of impulse to apply to the Actors damaged by this type. |
![]() |
float | DestructibleDamageSpreadScale | How much the damage spreads on a destructible mesh |
![]() |
float | DestructibleImpulse | How large the impulse should be applied to destructible meshes |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UDamageType
(
const FObjectInitializer& ObjectInitializer |