2d Melee knockback based on relative location attacker to the attacked

Should’ve posted pictures in the OP, but better late than never

Maybe I should add a radial impulse emitting from the center of the melee capsule or something? How would I go about doing something like that tho.