The relation between damage and applied impulse

I have an actor with a mesh root component. When the game starts the mesh is stationary but after receiving damage physics is turned on. The problem is that the impulse applied along with the damage gets lost as the mesh does not have physics enabled yet. A simple solution would be adding the impulse manually right after turning on physics but I couldn’t find any documentation describing the relation between damage strength and impulse magnitude.

My first guess was that it’s a constant multiplier but after doing some experiments it does not seem to be the case.

In such situations check engine source code, find class with funtion you use (C++ funtions usally have same name as blueprint funtions just without spaces) and look on sequene of events and deduce whats happening and how both are related. Even if you atleast got some text script skill you should able to read and understand the code, dont be afried, just try it :wink: you should find impulse and damage code in PrimitiveComponent class

Remember that you need to tie your github account with unreal profile so you can browse the source. API refrence also got code snippits

As it turns out damage amount and applied impulse has no relation whatsoever: impulse amount is a constant defined in DamageType.

One can either modify the C++ code or handle the impulse application manually in blueprints: first create your own damage type BP based on DamageType and zero out default values for DamageImpulse. Then in your physics driven blueprints apply the impulse when taking damage, factoring in damage amount in some way.

Still, it would be nice to have a bit more advanced impulse calculation in the engine, something like

AppliedImpulse = Clamp(DamageAmount * ImpulseMultiplier, MinImpulse, MaxImpulse);