HELP!!! Creating Blueprint to apply knockback weapon knockback on death to enemies

Hey Everyone!

I NEEEEEEEEEED HELP. I can not for the life of me get this blue print to work properly.
Essentially, what I have is the main character has a gun and shoots the enemy. On the last hit(killing blow) I want to it to apply impulse so it creates a nice little knockback effect.
I’m using line traces, and have a shotgun scatter effect, and this it being applied by the main character. I’m able to get the damage and ragdoll effects to work perfectly.
I just cant get the impulse effect to work.
On the enemy bp, I have the ragdoll effect and the add impulse. I have been able to get it to go in a single direction, up or down. but nothing relative to where the line trace hits.
Picture one is the break hit results from the main character.
And picture two is the enemy BP.

What am I doing wrong???!?? Please send help.


1 Like

Try to multiply the impact normal for a value and connect it to the “impulse” pin, try a huge value and tweak it later (because it might be unnoticeable otherwise), and I think it should be negative since the normal should be facing the direction where the line trace is coming from

2 Likes

So that didnt seem to work. I even disabled the impulse on the enemy character.
I did, however, notice that it affects the items in the world that have physics enabled. i.e the cubes and various junk lying around.

So it works on that, but not on the enemies. Surely im over looking something here and I just cant see it? Do you think it has to do with the ragdoll or simulate physic options?

Here is the whole line trace blueprint.

AddImpulse requires simulate physics to be enabled, as you can see from the source code, it’s trying to get the bodyinstance of the PrimitiveComponent and applying the impulse only if it’s valid:

Are the enemies “Characters”? In that case you could use the node “Launch Character” and this should help you overcome your issue:

Try to tweak the booleans if you see that it’s not working as expected.

1 Like

So I was able to get launch chanracter to launch the player character but not the enemy character.

I’ve been tinkering with the add impulse on the Enemy BluePrint. And i’m able to get it to activate on death, but only in up or down directions.

Is there a way to reference the impact normal on the main character (the shooter) and have it apply the direction to the enemy bp?

and additionally, is there a way to get launch character to ignore the main character and apply cast it to an enemy mesh/character?

heres my enemy Blueprint that works, but launches them straight up.