Download

How would i calculate the direction that my character got hit from

I have 4 hurt animations, with 4 different directions to get hit from. Id like to make a 2d blendspace that would choose an animation based on which direction the projectile came from. Im having a very hard time calculating which direction the character got hit from and converting it to a flaot. Im sure someone in the past must have been able to do this. Any help on the subject would be very freatly appreciated