I have some code for explosive objects that listen for OnComponentFracture then try to apply radial damage. Problem is the line of sight raycast (in ComponentIsDamageableFrom) is colliding with that actor’s own destructible fragments! The object the hit result returns is in the ignore actor list but it isn’t being ignored. I followed the code as deep as possible and it looks like it passes the correct info to the physx
I tried to work around this by setting the destructible’s response to channel visibility to ignore on the component fracture event (i’m using the visiblity channel the los check). But again, that doesn’t work and the ray still hits the destructible debris even they are not in even that channel! There definitely seems to be something weird going on with destructible debris.
For a specific example of what I’m trying to do… When player shoots an explosive barrel, I don’t want the resulting explosion’s line of sight raycasts to collide with the fragments from barrel itself. That causes nothing to take damage because it thinks the barrel is blocking everything. I need it to ignore the actor that is causing the explosion. I’ve tested this in a separate project in 4.10.4 with a simple destructible mesh and still seeing the same issue.
Right now the only thing I can do is not check los for explosive damage which is not a long term option. Any ideas?
I will be attempting to reproduce this issue on our end in a clean project. In the meantime, could you provide additional details on your setup? Would it be possible to provide your code or a small test project so that I can see exactly which results you are getting?
It’s a destructible cube that breaks on start up and fires out line traces every frame. The line traces are set to ignore self but it still collides with itself. You can set a break point in the blueprint to verify that.
As an additional, possibly related bug I set the collision response to visibility to ignore. So it definitely should not be colliding with a visibility line trace. You can verify that the visibility channel is set to ignore by pausing the game and inspecting the details of the cube after it breaks. Yet the line traces still hit it.
Have you tried selecting the cube in your level and setting the collision preset to Custom. Then, once you have done this, changing the setting from Block to Ignore Visibility using this method? If not, give that a shot.
I will continue looking into the issue with the blueprint node seemingly not changing the response to the Visibility trace channel.
Yes, that works but that will not give me what I need. I need the thing to block visibility and explosive damage before it is destroyed, and more importantly it needs to respect the ignore actor list.
For example, player is hiding behind a destructible barrel. AI can’t see the player because the barrel blocks visibility. When the barrel explodes the player should take damage and not have the pieces of the barrel itself block it’s own explosion.
There are 2 bugs here. The bigger bug IMO is it not properly respecting the ignore actor list. The visibility channel setting is a separate bug.
FYI, I already have an actual fix for the ignore actor bug. Check out DestructibleComponent.cpp line 1515…
(Owner ? Owner->GetUniqueID() : 0) should just be GetUniqueID(). We don’t want the debris to have the actor’s id, we want it to have the component’s id. Can you test that and roll it into the next update? Thanks!