struct
DestructibleComponent
- Module
- Destruction
- Header
#include "Destruction/DestructibleComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Properties
| Type | Name | Description |
|---|---|---|
bool | enabled | Default true. |
int32_t | pieceCount | Default 12. |
int32_t | seed | Default 7. |
bool | breakOnImpact | Default true. |
float | impactThreshold | Default 6.0f. |
float | scatterImpulse | Default 2.0f. |
float | pieceLifetime | Default 12.0f. |
bool | requestBreak | Default false. |
int32_t | cascadeLevels | Multi-level fracture: debris pieces inherit a Destructible with one level less, half the piece count, and a raised impact threshold — hard hits shatter the shards again. 0 = single-level (default). Default 0. |
std::string | fractureAssetPath | An offline carve (.fracture, the details block's Bake Fracture button). Empty means the Voronoi clipper runs on the game thread at break time, which is what a prop with sixty pieces cannot afford mid-firefight, and what leaves two peers carving from whatever collider each of them has. |
bool | replicateBreaks | The server owns breaks. With this on, a break on the host sends one (chunk set, seed, impulse) event and every client replays the same shards from its own bake; off, the entity simply vanishes on clients when its ghost despawns. Default true. |
bool | partialDamage | Partial damage: a hit releases only the pieces within Damage Radius of it, the rest stays standing as a remnant, and any part of the remnant that no longer reaches an anchored piece through shared faces falls with it. Off, a hit breaks the whole prop as before. Default false. |
float | damageRadius | Default 0.5f. |
EDestructionAnchor | anchor | Which side of the prop holds it up: pieces touching that side of the fractured bounds are anchored. None anchors nothing, so any partial hit drops everything the hit did not already release. Default EDestructionAnchor::Bottom. |
float | anchorMargin | Default 0.05f. |
bool | netDamagePending | Default false. |
Vec3 | netDamagePoint | Default Vec3(0.0f, 0.0f, 0.0f). |
float | netDamageRadius | Default 0.0f. |
float | netDamageImpulse | Default 0.0f. |
Vec3 | lastVelocity | Default Vec3(0.0f, 0.0f, 0.0f). |
bool | hasLastVelocity | Default false. |
bool | netBreakPending | Default false. |
uint32_t | netBreakChunkSetId | Default 0. |
uint32_t | netBreakSeed | Default 0. |
Vec3 | netBreakImpulse | Default Vec3(0.0f, 0.0f, 0.0f). |
Constructors
| Signature | Name | Description |
|---|---|---|
DestructibleComponent() = default | DestructibleComponent |
Public functions
| Returns | Name | Description |
|---|---|---|
void | MulticastPointDamage | Server → every ghost: "this prop took a hit here". |
void | MulticastBreak | Server → every ghost: "this prop broke". |
Function details
DestructibleComponent
C++
DestructibleComponent() = defaultMulticastPointDamage
C++
void MulticastPointDamage(Vec3 point, float radius, float impulse)Server → every ghost: "this prop took a hit here". The point, radius and impulse are enough because the pieces and their connectivity come from the same bake on every peer.
MulticastBreak
C++
void MulticastBreak(uint32_t chunkSetId, uint32_t breakSeed, Vec3 impulse)Server → every ghost: "this prop broke". Only the event is carried — never the shards — so the wire cost is three words however many pieces the bake holds. The system consumes the pending flag on its next tick, because the RPC lands mid-frame and a break destroys the entity.
Generated from Destruction/DestructibleComponent.h via destruction.json · Oct 26, 2026Version 1.0.0