For the complete documentation index, see llms.txt. This page is also available as Markdown.

Chaos Destruction - Experimental

Unreal Engine's Chaos Destruction system supports physically simulated destruction via Geometry Collections, and includes built-in replication support. However, this replication is not compatible with Morpheus out of the box. This has been extended for Morpheus to support Chaos destruction replication, ensuring that destructible objects break consistently across all connected clients.

Note: This feature is experimental. Because Unreal's Chaos Destruction system is computationally expensive and carries a performance cost. Profile carefully when using large or complex Geometry Collections in networked contexts.

Setup

To enable networked destruction on a Geometry Collection, the following must be configured:

1. Enable the M2Extras_Chaos Plugin

  1. Go to Edit > Plugins in the Unreal Editor.

  2. Search for M2Extras_Chaos and enable it.

  3. Restart the editor when prompted.

or

  1. Add M2Extras_Chaos as an enabled plugin in your .uproject.

2. Enable Replication

In the Geometry Collection asset or actor:

  1. Select the Geometry Collection in the editor.

  2. Open the Network tab in the Details panel.

  3. Set Enable Replication to true.

This allows the Geometry Collection to be replicated in Unreal's replication system, which Morpheus hooks into.

3. Disable "Abandon After Level"

Still in the Network tab:

  1. Set Enable Abandon After Level to false.

This ensures the server continues to replicate all levels of destruction rather than stopping replication past a certain break depth. Leaving this enabled will cause clients to miss deeper breaks and fall out of sync.

4. Continue According to Unreal's Documentation

https://dev.epicgames.com/documentation/en-us/unreal-engine/destruction-quick-start#2-creatingthegeometrycollection

Applying damage

Damage can be applied to a Geometry Collection in two ways.

Physics Collision

When a physics object (such as a vehicle) collides with a Geometry Collection, strain is applied automatically. No additional setup is required.

Manual Strain via Blueprint (e.g. Projectiles)

For cases where you need to trigger destruction manually - such as spawning a Master Field on bullet impact - use the Server Apply Strain to GC function on the BPM_Destruction_Singleton.

Steps:

  1. Get a reference to the singleton by calling Get Actor of Class and selecting BPM_Destruction_Singleton as the class.

  2. Perform a Line Trace by Channel to detect the hit.

  3. Break the Hit Result to extract the required values.

  4. Call Server Apply Strain to GC on the singleton with the following parameters:

Parameter
Source

Geometry Collection

The GC actor you want to damage

Location

Hit Location from the broken Hit Result

Item Index

Item from the broken Hit Result

This will spawn a Master Field at the hit location, applying strain to the Geometry Collection at that point and triggering destruction if the strain exceeds the piece's threshold.

Last updated