Skip to content
CRUSHFORMV1.1.0
GET IT ON FAB

REFERENCEDATA ASSETS

UCFBreakableDefinition

MODULECrushformBreakableINCLUDECFBreakableDefinition.hPARENTUPrimaryDataAsset

One kind of breakable unit: its intact mesh, baked debris pieces and break tuning.

Functions

AUTHORITY · server, every machineLOCAL · this machinePURE · read only
uint8 ResolveHitLevel(FName HitKind, float Strength, uint8 MaxLevel, uint8& OutResponseIndex) const
PUREC++ ONLY

The level an outside hit of HitKind reaches (0 = none) and its row in HitResponses (CFBreakable::NoResponse when 0). MaxLevel is the highest level the unit can still be taken to.

bool IsIntactMeshRequired() const
PUREC++ ONLY

Whether IsDataValid asks for IntactMesh. A definition whose pieces are not cut from a mesh returns false.

FGameplayTag GetFeedbackTag(ECFBreakableFeedbackKind Kind) const
PUREC++ ONLY

The tag of the sound and effect the game plays for a feedback of Kind; empty = the host plays the plugin's tag for the event (CFImpactTags).

const FCFBreakableHitResponse* GetHitResponse(uint8 ResponseIndex) const
PUREC++ ONLY

The row of HitResponses at ResponseIndex; nullptr for NoResponse or out of range.

float GetBreakFeedbackIntensity(const FVector& ImpactVelocity) const
PUREC++ ONLY

Break feedback intensity in 0..1: the speed of ImpactVelocity (cm/s) over SpeedForFullBreakIntensityCmS, clamped.

Properties

TObjectPtr<UStaticMesh> IntactMesh

The mesh a unit shows while intact; the bake cuts the debris pieces from it.

Category
Mesh
bool bBakeAsSinglePiece = false
Default
false
Category
Bake
float DensityKgPerCm3 = 0.0005f
Default
0.0005f
Category
Bake
float MaxPieceLengthCm = 60.f
Default
60.f
Category
Bake
float MinPieceVolumeCm3 = 50.f
Default
50.f
Category
Bake
float CutTiltDegrees = 15.f

Each saw cut is tilted by a random angle of up to this many degrees either way.

Default
15.f
Category
Bake
int32 BakeSeed = 1

Seed of the bake's random choices (cut tilt, glass shard layout). Change it to get a different set of pieces.

Default
1
Category
Bake
int32 BakeRevision = 0

Written by the bake: advances by one with every successful bake.

Default
0
Category
Bake
TArray<FCFBreakablePiece> Pieces

The baked debris pieces; written by the bake, not edited by hand.

Category
Bake
float InheritVelocityFraction = 0.6f
Default
0.6f
Category
Scatter
float ScatterSpeedCmS = 300.f
Default
300.f
Category
Scatter
float ImpactFalloffCm = 150.f
Default
150.f
Category
Scatter
float MaxAngularSpeedDegS = 540.f

Fastest spin a thrown piece starts with, in degrees per second. Each piece gets a random share of it, smaller far from the impact point.

Default
540.f
Category
Scatter
float SpeedForFullBreakIntensityCmS = 1500.f
Default
1500.f
Category
Feedback
bool bDebrisLastsUntilRespawn = false
Default
false
Category
Debris
bool bDebrisPushedByVehicles = false
Default
false
Category
Debris
float DebrisVehicleContactSeconds = 3.5f
Default
3.5f
Category
Debris
bool bDebrisCollidesWithDebris = true
Default
true
Category
Debris
float DebrisLifetimeSeconds = 8.f
Default
8.f
Category
Debris
float DebrisRestSeconds = 3.f
Default
3.f
Category
Debris
float DebrisSinkSeconds = 1.f

Seconds a resting piece takes to sink away once its rest time is over.

Default
1.f
Category
Debris
TArray<float> HitLevelThresholds
Category
Hits
TArray<FCFBreakableHitResponse> HitResponses
Category
Hits