- Home /
Destroying object when too much force applied?
So, I want to make a plate which is destroyed when some amount of force impacts it. For example when it's dropped it won't break, but if you throw a heavy break on it it will be destroyed, just like joints can be broken at some amount of force. Do you know any command or method to use impact force as a condition of destroying? I would prefer C#, thanks and sorry for writing mistakes; England language hard language.
There are two separate questions here 1) how to detect the force applied, and 2) how to shatter/break something. If you are looking for an answer to both, you might split them into two questions. I know #2 has been answered on UA a few times (and in different ways). While I've never tested it, the Collision you get from OnCollisionEnter() has a 'relativeVelocity', and you can easily get the mass of both objects, so calculating the force appears to be easy. You'll have to test it.
I actually know how to shatter/break something, i'm searching how to detect the force applied. Thanks anyway, I'll try that out.
I don't know the nature of your game, but you may want to just use relative velocity and ignore the mass. Usually not every object that the 'plate' will collide with will have a Rigidbody.
Your answer
![](https://koobas.hobune.stream/wayback/20220613142759im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Destroy multiple game objects when player press a button 2 Answers
Destroy gameobject 2 Answers
Destroy On Collision 4 Answers
Destroy Object On Collision 1 Answer