class

DestructionSystem

Module
Destruction
Header
#include "Destruction/DestructionSystem.h"
Namespace
Mowo

Constructors

SignatureNameDescription
DestructionSystem() = defaultDestructionSystem
~DestructionSystem() override = default~DestructionSystem
DestructionSystem(const DestructionSystem&) = deleteDestructionSystem

Public functions

ReturnsNameDescription
DestructionSystem&operator=
voidInitialize
voidShutdown
voidUpdate
voidSetSceneHooksScene injects these so runtime-spawned pieces are registered with the Scene's entity metadata (name, layers, render filter).
voidApplyDamageFieldField-based damage: every Destructible whose position lies within radius of center breaks, and its debris inherits an extra velocity pointing away from the center, scaled by impulse and a linear distance falloff — the explosion primitive (grenades, barrels, spells).
boolBreakWithEventBreaks entity from an explicit event — the client replay path, and the way a test pins that two peers land the same shards.
uint32_tApplyPointDamagePartial damage at a world point.
boolIsRemnantPieceRemnant bookkeeping, for tests and tools: how many pieces of the prop that entity belonged to are still standing, and whether an entity is a standing remnant piece at all.
uint32_tStandingPieceCount
FDestructionBreakEventMakeBreakEventThe event the host would send for a break of entity now.
Vec3PieceLaunchVelocityPure over its inputs: the same event lands the same shard the same way on every peer, and a different seed lands it differently.
const FFractureBakeData*ResolveBakeCached per path; a miss stays cached as null so a broken reference is reported once rather than re-read on every break.
voidRegisterBakeSeeds the cache directly — a headless test has no VFS to load from, and a game that ships bakes inside its own archive can hand them over.
FDebrisPool&GetDebrisPool

Function details

DestructionSystem

C++
DestructionSystem() = default

~DestructionSystem

C++
~DestructionSystem() override = default

DestructionSystem

C++
DestructionSystem(const DestructionSystem&) = delete

operator=

C++
DestructionSystem& operator=(const DestructionSystem&) = delete

Initialize

C++
void Initialize(World* world) override

Shutdown

C++
void Shutdown() override

Update

C++
void Update(float deltaTime) override

SetSceneHooks

C++
void SetSceneHooks(std::function<EntityID(const std::string&)> createEntity, std::function<void(EntityID)> destroyEntity)

Scene injects these so runtime-spawned pieces are registered with the Scene's entity metadata (name, layers, render filter). Without hooks the system falls back to raw World entities (headless tests).

ApplyDamageField

C++
void ApplyDamageField(const Vec3& center, float radius, float impulse)

Field-based damage: every Destructible whose position lies within radius of center breaks, and its debris inherits an extra velocity pointing away from the center, scaled by impulse and a linear distance falloff — the explosion primitive (grenades, barrels, spells). Enabled/broken state and cascades behave as in impact breaks.

BreakWithEvent

C++
bool BreakWithEvent(EntityID entity, const FDestructionBreakEvent& event)

Breaks entity from an explicit event — the client replay path, and the way a test pins that two peers land the same shards.

ApplyPointDamage

C++
uint32_t ApplyPointDamage(EntityID entity, const Vec3& point, float radius, float impulse, bool fromNetwork = false)

Partial damage at a world point. entity is a Destructible with Partial Damage on, or a remnant piece of one already hit. The pieces within radius of the point are released as debris (pushed away from the point by impulse), then everything left that cannot reach an anchored piece through shared faces is released too. Returns the number of pieces released; 0 when nothing was in range or the entity is not damageable this way. The whole-prop break is what a Destructible without Partial Damage does instead.

IsRemnantPiece

C++
bool IsRemnantPiece(EntityID entity) const

Remnant bookkeeping, for tests and tools: how many pieces of the prop that entity belonged to are still standing, and whether an entity is a standing remnant piece at all.

StandingPieceCount

C++
uint32_t StandingPieceCount(EntityID entity) const

MakeBreakEvent

C++
FDestructionBreakEvent MakeBreakEvent(EntityID entity, const DestructibleComponent& dc)

The event the host would send for a break of entity now.

PieceLaunchVelocity

C++
static Vec3 PieceLaunchVelocity(const FFracturePiece& piece, uint32_t pieceIndex, const Vec3& inheritedVelocity, float scatter, uint32_t seed)

Pure over its inputs: the same event lands the same shard the same way on every peer, and a different seed lands it differently.

ResolveBake

C++
const FFractureBakeData* ResolveBake(const std::string& path)

Cached per path; a miss stays cached as null so a broken reference is reported once rather than re-read on every break.

RegisterBake

C++
void RegisterBake(const std::string& path, const FFractureBakeData& data)

Seeds the cache directly — a headless test has no VFS to load from, and a game that ships bakes inside its own archive can hand them over.

GetDebrisPool

C++
FDebrisPool& GetDebrisPool()
Generated from Destruction/DestructionSystem.h via destruction.json · Oct 26, 2026Version 1.0.0