Help please

Hi everyone,

I am still a beginner in the UE4 and I am stuck with the animation how to apply certain animation under certain constrain.

please could someone help me in this, I have a car and I have citizens I want to apply the death animation to people when the car collide with them. So the only thing I need is how to apply specific animation when the character collide with another character.

Thanks in advance.

If you already have some collision shapes (e.g. capsule, sphere or box) or skeletal meshes with a phsyics asset then you could just select them in the components part of your blueprint, rightclick and choos any of those “OnComponent” events like “OpnComponentHit” or “OnComponentBeginOverlap”. Do this in your car actor. This would add a further event to the event graph that only gets triggered when you get some collision event with something else. From there you could do some branches like checking if the other actor is some actor you would be able to kill and if yes then do some “ApplyDamge” like “ApplyPointDamage” or “ApplyRadialDamage” to your victim actor. You could choose some base damage and probably multiply it with your current speed (as it would suck if somebody runs into a car that stands still and dies screaming afterwards :)). You could just easily add some “EventAnyDamage”, “EventPointDamage” or “EventRadialDamage” in the eventgraph of your character blueprints afterwards and do something with it. Like decrease health and if too low then die or just … insta die if the causing actor was a car. Afterwards you can continue with some “SetSimulatePhysics” to true. This would enable the physics simulation (ragdoll). So you don’t need a keyframed anim to let them die but just use the phsyics engine to let them drop down. However before this looks good you have to setup some proper limits for your characters in your Physics asset. You need various angle limits so your bones does not freely rotate in any direction (as this would look more like some balloons instead of some body).