Hello,everyone! my English is not good,hope you can understand my means. I want to get force for a rigidbody. For example, punch a person, the person will get how much force.
force = mass * acceleration
and
acceleration = (velocity - oldVelocity) / time
so, it should be something like this:
float oldMag = 0.0F;
void Update()
{
float curMag = rigidbody.velocity.magnitude;
float accel = (curMag - oldMag) / Time.deltaTime;
float force = rigidbody.mass * accel;
print ("The force on " + this.name + " is: " + force);
oldMag = curMag;
}