Force inforamation

Hi,
i am new to Unity so maybe this is a very simple question.
How do I get the force that is applied to a rigidbody using a box collider? E.g. if the body is in the air the force should be the vector of G.

Tks!

rigidbody.velocity will return the current velocity of the rigidbody.

What you might want to do then is create your own rigidbody subclass and just override AddForce to track the acting force.

The rigidbody component doesn’t track the forces. All forces directly affects the velocity and cause a velocity change.

You might be able to calculate the overall force by storing the velocity from the last frame and calculate the difference.

Keep in mind that most forces generated by the physics system are impulse forces and are only applied once.

Note that forces that are applied at a specific point are converted into a force at the mass center and a torque around the center.