I have destructible elements. All pieces of the fractured geometry collection are on the same level. Once some of the pieces break, my rocketship successfully pass through all the time so the collisions are successfully refreshed.
My issue is that SOMETIMES and only sometimes, My lasers hit part of the geometry that isn’t there any more.
My rocket ship never has this issue but both types of laser, sometimes, hit invisible collisions. 1 type of laser HITs the invisible part of the geometry collection. The other laser is using a trace on VISIBILITY and also sometimes HITs (from the visibility trace).
So it looks like the geomety collection collision is not properly updated but this only happens in some occasions but not all the time.
I tried everything I can think of for severals days. Updating collisions, removing all cluster after impacts etc. Nothing helped.
Would there be a way somehow to force refresh the collision of the geometry collection or any other ideas?
UE 5.3 (Blue Print)
(In the below screenshot you can see an instance of the laser hitting the removed part of a geometry collection)
I fixed it but it will take more resources to run,
After trying absolutely everything I could think off, I amended both lasers:
The one hitting with a static mesh moved with movement component is now also simulating physics. This fixed the problem with hitting actually visible pieces of the geo collection but it created other issues for my laser (I fixed those too but it’s not related to this issue so I won’t go through that here)
There is something weird happening in the geo collection.
If I set it to block hit event for my trace, I have the issue of, sometime, hitting the original shape.
If I set it to ignore Hit response, → same problem (the main level gets hit I guess but then the collision doesn’t always get refreshed).
But if I set it to ignore Hit response and set each individual pieces to another collision profile on Beguin play. Then, tracing for that new collision profile without hitting the original shape works. BUT this only works after the collection broke once!
Knowing this:
The other laser hitting using a line trace was hitting removed pieces, it was basically still hitting the original geo collection even after it broke. For this one, I had to do additional check to also trace specifically for the geo pieces if it hit the main shape (which could be invisible). So if the trace hit a geo collection, (at this point the hit is always accurate), I break the geocollection at impact location. Once broken, other laser hit use a different line trace that checks for the actual visible pieces (ignoring the main trace hit). I had to do a little more to support cases where more that 1 geo collection is hit but overall that how I fixed this.
Not amazing, performance won’t be as good but at least it can now be used for gameplay.
Good freaking luck if you have a similar issue
I might check if UE 5.6 doesn’t have this issue but I’m almost done with the game so will see if worth it.