Hi!
I’m working on a project where we have a vehicle, and we need it to explode if it gets crushed by a very heavy rigidbody.
When I search for a way to get the collision force in Unity, I get the answer that there is none and that I need to use the velocity and mass of the rigidbodies to calculate the collision force.
Problem is, the proposed functions to calculate the force from velocity and mass doesn’t give me useful values. Imagine a scenario that has no gravity or ground, where an extremely heavy and big rock comes from above and hits my floating vehicle. The force of the collision won’t actually be that strong. Now, however, imagine that same scenario with ground directly under the vehicle. Because the vehicle gets trapped in between, that force will instead be very strong. I’ve used Box2D and Chipmunk for physics before I got into Unity, and there has always been a way to retrieve the force that is applied during a collision, making this a very trivial task.
Has anyone here needed to accomplish something similar to this? How did you solve it?