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.
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
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?
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: