I have the above code to check to see if the sword hits the enemy, and kill it if damage type is correct.
With just that function nothing happens, the function is not called at all when the sword hits an enemy. I have put UE_LOG above the if statement to check whether its called at all, it isn’t.
However if I go into the swords blueprint and literally do nothing else other than add the On Component Begin Overlap Node everything works fine. So I think this indicates my code and collision settings are correct, but there is some unexpected behavior where it doesn’t work without that node.
Now I know I can just keep the node, but I was wondering if anyone has come across something similar and knows how to fix this.
Yes I did, I have it attached to my capsule component in the constructor of ASword. And its the on component begin overlap node of the capsule component that I have to bring out to make it work.