What ia the best way to apply knockbacks and forces that are summed to the player

I am making an action game where you can use items to move, like a grapple Hook i made with ropeconstraint, or a dash, and also be moved by obter things, like knockback from enemies or world objects.
The issue is that idk whats the best way to sum those forces (example: I dash towarda north, but an enemy knockbacks me to east, and the resultant force should go southeast)
I tried alignposition, but, because they change the resultant velocity of the players instead, It doesnt work. What couls i use instead?

1 Like

Just add the force vectors. If you have a dash to north Vector3.new(0, 0, 1) and then a knockback to east Vector3.new(1, 0, 0) then (0, 0, 1) + (1, 0, 0) = (1, 0, 1) and you get the correct northeast knockback

You mean when I apply a knockback I sum it with the player actual vector to calculate the Resultant Vector and set it on the server? It could work in client side, because on the server it would replicate to the player and make it jitter a bit. Also, I wanted to make this game with Server Authority, and was already working around it