2d Melee knockback based on relative location attacker to the attacked
I want to be able to send an enemy flying on impact from my character's sword, and the way I've done it now is to add a static impulse on the enemy blueprint when hit. However, I want this impulse to be decided on where it was hit. For example the player swings his sword in an arc, the enemy is hit at the top of the arc I want him to be launched upwards. I thought about making a variable in the damage type and sending that to the damaged enemy, but that would still be a static number, and I can't find out how to make it fly right if the player is on the left side of the enemy and vice versa. Please help!
Follow this question
Once you sign in you will be able to subscribe for any updates here