Destructible Mesh Chunk Replication
So I have a simple crate that I have created a destructible mesh (DM) from.
This DM is part of an actor blueprint (BP) that fractures the DM when it takes damage. The actor BP containing the DM is setup to replicate.
The physics of the DM replicate just fine across all clients and the server, including the actual fracture event which "explodes" the DM.
The problem is that the chunks generated when the DM fractures are not replicated, they're simulated on each client/server and therefore the result is that the chunks from the fracture end up in different places on every single client/server, the end result of which is incorrect collision detection on all clients.
The way it's setup is that the player character triggers a damage event that will replicate and only run on the server. The DM BP detects when it takes damage, it then runs a Multicast event, this Multicast events executes on all clients and the server, this is were damage is finally actually applied to the DM which causes it to fracture.
I assume since the Apply Damage event is triggered on each client individually, this is what causes the actual fracture of the mesh to be simulated individually on each client, and therefore the inconsistent result.
So the question is: is there a way to replicate the fracture effect of the DM across all clients so that they all see the exact same fracture?
Or simply, is there a way to run the Apply Damage event on only the server and have the effects of the fracture event replicate to all clients?
asked Mar 24 '17 at 07:21 PM in Blueprint Scripting
Hello due to the way UE4 handles debris is on endpoint only, the server will replicate the fracture points and then the endpoints will create the debris independently, there is no way around this for standard debris, unless there is a rewrite of the destructible engine, as all the debris would cripple the network,
just in case you are interested I think this might help sort your issue for the most part ;) https://www.unrealengine.com/marketplace/dent-destructible-environment
answered Apr 25 '17 at 11:22 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here