I'm using the physics behaviour and basically want one of my objects to be damaged on impact with other objects, where the amount of damage is proportional to the force of the impact.
I guess my problem is that I don't really know what I mean by force of impact. My best guess is either the change in momentum of the object or the change in energy, before and after the collision.
I can't get it to act the way I want, for example, one problem I've had every time was that if, say, I wanted an object to be hurt when it fell from a big height, then a lot of the time when it was pushed along the floor it got hurt just as much. (usually when the floor was a downward slope).
I can see the reason for this happening but can't think of a way around it,
my event was an attempt at the kinetic energy (1/2 mv^2):
on collision -> subtract (sprite1.mass+sprite2.mass)*((sprite1.xvel-sprite2.xvel)^2+(sprite1.yvel-sprite2.yvel)^2) from health
So here when the object was moving fast along the floor it wasn't slowing down and kept losing health proportional to speed. (there sprite1 was the object and sprite2 the floor).
I'm guessing I need some way of resolving the angle of the collision, not sure how to go about this either though.