I’m trying to build a second door BP similar to the first simple pane (Orange) door, however the new door doesn’t have a collision for my line trace to detect. What I got with the asset package was skeletal meshes with physics and animation assets, and programmed it to open when the player is both in range and looking at the skeletal mesh (As seen below)
Now I’ve tried making the same blueprint for a blast door model, however despite having physical collision, the line trace doesn’t detect it, which doesn’t trigger both branch’s conditions to open/close the blast door. (Blast door BP)
I’ve tried enabling and disabling per-poly collision, made a new physics asset for collision, but I can’t wrap my head around this issue. I can’t tell what’s different from the first door BP, or why it would cease working when I put it in an Actor BP (Line trace does detect it as a lone skeletal mesh in the viewport during testing).
Any and all suggestions would greatly be appreciated.
I see there is a cast to BP_Door_Master from the HitResult of the line trace. what is the relationship between the BP_Door (what I am presuming is the wooden door that works), and BP_Blast_Door (the door that isn’t working), and this BP_Door_Master
if BP_Door is a child class of BP_Door_Master (you can check this by looking in the top right corner of the Blueprint where it says “Parent Class”) then the cast will be successful, but if the BP_Blast_Door is not a child class of BP_Door_Master or a child class of BP_Door then the cast will fail, and the following code will not continue.
there are a few ways to go about fixing this depending on the implementation of the BP_Door and BP_Door_Master:
try duplicating the BP_Door (in the content drawer right click BP_Door and select “Duplicate” then in that new Blueprint go to the Skeletal Mesh Component and change the Mesh → Skeletal Mesh Asset to your other door. (this would be if you want the same behavior in your BP_Blast_Door that is in BP_Door
reparent the BP_Blast_Door to inherit from BP_Door_Master; with the BP_Blast_Door open go to File->“Reparent Blueprint” (this could cause some data conflict if you have recreated variables which will need to probable be removed from the BP_Blast_Door especially if they already exist in the BP_Door_Master)
if you this does not “fix it” then you it might still be a different collision response:
in your BP_Blast_Door find the Collider in question->Collision->“Collision Preset” and under Collsion Response (?) → “Trace Response”->Visibility make sure this is set to “Block” and see if that fixes it. if there is no specific collider parent component you can check the SkeletalMesh for the same Collision section.
testing collision against Skeletal Meshes is not great especially if there might be many items to test against, and generally for the best Binary Space Partition search having “as simple collision as possible as early as possible” will give the best result.
though if you did the Duplicate option in my above response then the collision setting will be copied anyways.