Lets Make: DamageSystem from Blueprint in a Blank Project

As a part 2 of my Lets Make: Pawn from Blueprint in a Blank Project

I would like to add a damage system. The idea is simple, if you hit a wall with speed greater than x you get damaged. This BP is based on pawn , I know that the Character BP has “Get current acceleration” Anyway…

Physics time…
As far as I am familiar with physics My idea needs an acceleration value ( I am going to ignore the mass of the objects and the contact area for simplicity ).

When the Abs value of the Acceleration is greater than some number we are going to damage the player.

and according to this

The problem is that I don’t know how to get the t1 t2 v1 and v2 in BP

I can get some vars from the beginning of the the button press but in this case when the floor collapses and the player has not pressed a button (he may but we are not sure) we won’t get fall damage.

Additional thoughts:
I can damage the player if he exceeds a certain amount of speed but this doesn’t work for simulating a person.
Post ideas:)

Hi man, is not really clear,

you want to add a damage sistem.
to damage the player if speed is greater than X.

Why do you need an acceleration value?
When the accelleration is greater than something does not mean that the pawn have a certain speed.
You can have 100 accelleration and 1 speed,
What are T1 T2 V1 V2 ?

Floor Collapse?
If you can damage the player at certain speed , what are you asking?

You can get the velocity of an object by calculating v = s/t = (s2-s1)/(t2-t1) where s2 and s1 are the actor’s locations at times t2 and t1. Maybe you want to make this in the tick-event and use deltaseconds and save the velocity in a variable, so you have at every time in the game the velocity of the actor.
The acceleration is a = v/t = (v2-v1)/(t2-t1). You will need to get the old velocity (v1) and the calculated new velocity (v2) to calculate acceleration.

Like here (did not test it, but should work):

And all that, go invent a time machine to deliver the answer back to the OP in 2014… :stuck_out_tongue:

@ThiloN1987 @Est_engine

After all ^^ that ^^, go and invent a time machine to deliver the answer back to the OP in 2014! :stuck_out_tongue:
With all the unanswered / ignored posts on the forums in present day, how does this happen? :confused:

Hey, still helps people who are researching fall damage using the search function like I am currently :wink:

BTW, thanks for the help in my movement post :slight_smile: