LineTraceByChannel Not returning collision

Okay, so I am working out my damage system, here is the way I am thinking it should work.

ParentGun - Base class - holds all information on damage amount, ammo amounts
playerCharacter - Player - holds all guns, based on visibility on an array that switches them out
Interface - Allows to transfer the damage variable among classes that have this interface added under class settings.
BasicEnemy - has the interface (so does the player BP), should be able to call the event from the trigger in the player character blueprint.
On input Fire (LMB pressed) -----

This does work for the 3 weapons I have set up, checked by print string so then I access my “Fire” function which goes like this.

On this segment the breakpoint never fires, it never even detects what collision it is hitting (had a print string from HitActor to try and give me that actors name but it never fires). So logically in my head it should see the HitEnemy, grab the damage for the pistol from the parent class (ParentGun_Base), then it should hit this section of nodes inside the BasicEnemy_BP:

But that event never triggers, I am misunderstanding something fundamental here.

Im sorry if this isn’t clear about whats going on, my linetracebychannel node is firing and it casts to parentgun_bp (to grab the damage variable for hit enemy node) but after that it goes back out to the inputaction fire and goes down to the third weapon in that array, at no point is the event (Event Hit Enemy - grabbed from Damage Interface) in the basicenemy_BP ever called to update that actors health.

If anyone has any insight into whats going on here, any and all help is very much appreciated. Thank you!

If Fire is being called, then the problem is in either the branch or the cast. Are you sure that both of those are going through? The problem may be in the collision detection. Make sure overlap/collision is set up properly on the enemy hitbox

1 Like

Turns out it was the collision, and also I was casting to the wrong actor type, but with an interface I don’t have to cast at all to my basicenemy class so now I’ve got my shotgun set up as well as the pistol. Thank you so much for helping! Sorry it took me another week to solve this I can post the solution here for anyone else struggling with this, just look at my Event Hit Enemy, and thats actually the only other setup. Its dirty but that can be fixed later on.

Solution w/ interface: