I’ve got a bit of a noob question here: I’ve got a simple melee system in place using a collision box component in my character’s blueprint that I activate, get overlapping actors (to which I apply damage), and then deactivate. It’s all working so far (though I have aims to figure out a way to have the weapon out for longer than just an instant and apply damage to any and all enemies that touch it during that time, but that’s not what I’m trying to solve right now).
The problem popped up when I tried to implement the system for taking damage myself. I got an enemy up and running that does damage to me when I run into him, and that works fine. The issue is that when I attack with my sword and activate the sword’s collision box to take an overlap reading and apply damage to the enemy, the enemy takes that same overlap event as an excuse to apply damage to me as well. It thinks that I just ran into it, even though it’s only overlapping with my blade.
I need to figure out a way to get the zombie I’m attacking to tell the difference between my character’s capsule and my sword’s collision box so it can only apply damage to me when it overlaps my capsule and not my weapon, too. Any ideas?