How to determine the Damaged Type through the actor that received the damage and the direction of the weapon that gave the damage

Although I thought a lot about implementing the functions described in the title,
I couldn’t think of an efficient Logic.

The system that I ultimately want to implement is the same as the function of the image below.

I have implemented similar functions by mixing Mesh’s Dot Product and Collsion, but I don’t think it’s a good way. If you have any great ideas, I’d appreciate your advice.

Hey there, have you taken a look at the gameplay statics functions?
Take an Actor BP, for example, head over to the MyBlueprint tab, under Functions, if you hold your mouse over the “+” you can deploy the “Override” submenu with a bunch of built-in functions/events you can use. Have a look at the Apply Point Damage one; you can pass a lot of information through that event, including a Hit variable which you can use to calculate those dot products via the impact normals and positions. You can also use this event to pass along your own Damage Class that you could use to make further calculations for velocities and impact forces.
Cheers!