Getting crushed by very heavy or kinetic rigidbodies.

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?

Hi,
one way is the DETONATOR Asset which you get in the Asset store for free
When something hits your player then instantiate the demolate model. So its only a fake but functioned.

You use Box2D and Chipmunk in Multimedia Fusion?
In MF2 I search also for good tuts to understand that. Do you have something?

Yeah, I used both Box2D and Chipmunk in MMF2, and the fact that you could get the force that was applied during a collision made this task super easy. However, figuring out how to detect it in Unity is the challenge.

I’m not sure Detonator will help me here. The difficult thing isn’t to make something explode, we got all the visuals of it covered. The problem is rather how to detect when the explosion should occur it in the first place. Never the less, it looks like a nice asset and could be an useful as starting points when I’m making explosion effects. Thanks for letting me know about it.