Trying to apply force/impulse in a direction by a given magnitude

I have the location the overlap starts and the location the overlap ends. I can draw a debug arrow between these points. The debug arrow is correct and lines up with the sword swing trajectory.

The location of my sword on begin overlap (overlapping the mesh I’m hitting) is stored as a vector variable(hit start) and the end overlap sword location is stored as a vector variable(hit end).

As i said the variables are correct, however, i want to apply force/ impulse in that direction and also be able to customize the magnitude of the force/Impulse.

How do i get force/impulse to apply (to the mesh I’m hitting) with the same trajectory as my debug arrow and then customize the amount of force/impulse so that i can decide how hard it gets “hit”?

HitEnd - HitStart

That will give you a Direction Vector with the Length between those Points. You want to Normalize this Vector (we are intrested in the Direction only without any additional Force that comes from the Length of th Vector. But thats up to you) and than Multiply by a Strength (float) before Handing it over to your Force Function. Adjust Strength to your needs the bigger the higher the Force is.

THANK YOU!! This is sooo sick. It’s so impactful XD I’m about to head into work, but this is going to make me smile all day just thinking about it :slight_smile: Cant wait to crush my npc more when i get home!