How Can I Add Impulse After "Set Simulate Physics"

Hi, I’m new to this. I created an FPS game through a course. As you can see in my event graph, I’m making hit and apply damage per bone. My onRep_IsDead function activates physics when my character dies.

My problem is: when this physics is activated, I want to apply an Add Impulse to the bone on the bullet’s towards.I mean, if I shoot the character in the back of the head, his head will fall forward. But I’ve tried everything and haven’t been able to do it. I would be very grateful for your help. Thank you. PS: Don’t forget I’m very new to this :slight_smile:

is MC bullet impact your function to add a force impulse?
If so, then you have to add it after apply damage, because you’re applying it when the character is not yet dead - so his physics is not yet simulated, so the Add Impulse is ignored.

Usually when you try to Add force to a body that does not simulate physics it shows a warning in message log.

Hi lordlolek, thank you for your reply. MC Bullet Impact only runs SFX and Muzzle flash. Actually, I’m adding “add impulse at location” after the “Set Simulate Physic” node in my “OnRep_IsDead” event (shown in the photo), and this works when my character dies. I just can’t get the hit bone and the angle of impact into this event. I haven’t been able to get the hit results from the Line Trace into the “add impulse at location” in my “onrep_isdead” event. I tried doing it using variables (by replicating) but without success. I think if I understand how to do this, I’ll solve the problem.

Oh ok, I misunderstood your question!
So, you’re looking for a way to pass on the Last Hit information over to character that was hit?
In this case you have two options:

  1. Don’t pass on the information - just let the bullet Add Impulse after the damage
  • in this case, after the Apply Damage add Add Impulse node using your Last hit info. If it fires too quickly (and the physics is not enabled yet) you can add Delay (easy but not very clean solution) or check if the hit target is dead after the damage.
  1. Pass on the last hit info with custom function, ie trough the interface.
  • in this case you create a bp interface with a function like “Apply Bullet Impact” with Hit Info input, then implement this interface in your characters and handle it inside the character.

Thank you so much for your suggestions, they were all very helpful. I will try them. Thank you very much.

1 Like

Hi lordlolek. I followed your advice and edited my blueprints as shown in the image. “I chose the easy way, for now :)”. Actually, the solution was very simple, and I was trying complicated things. You also taught me how important logical thinking is. Thank you very much, I’m grateful.

1 Like