Fall/squeeze damage for kinematic body (SOLVED)

Hey!

I’m trying to make kinematic object to receive damage from

  • falling
  • squeezing by other static and kinematic objects

Which way is the best one to measure this?

I used message.applied_impulse before changed dynamic to kinematic. But it seems that applied_impulse is always zero in kinematic type.

Thanks!

2 Likes

Since you are in total control of the movement of a kinematic object it is only you who know how fast your object is falling, and thus the force of the impact when colliding with some other object.

I assume you have a velocity vector3 or similar for you game object? And you can either read the mass or configure it as a custom property in your script. Based on this or some even more simplistic mechanic you can assign damage through collisions.

1 Like

@britzl oh. You’re right. I’ll move forward with this. Thanks for the clarification)

1 Like