i wanna ask how to make the script
If collision between two object more than 50% destroy it?
i really out of idea for that
Example like this
i wanna ask how to make the script
If collision between two object more than 50% destroy it?
i really out of idea for that
Example like this
50% of what?
maybe instead you should check the velocity of how fast the objects were going when they actually do collide. Just a suggestion.
Take a look at collision.relativeVelocity.magnitude
(eg)
if (collision.relativeVelocity.magnitude > 2) {
// Cut my grass
}
I mean 2 object collision and if the collision percentage less than 50% will destroy,
you know what i mean?
see the example image below
Unfortunately I don’t know what you mean. What is the thing you want to measure a percentage of?
measure how many touch collision between 2 object, you know what i mean?
He means if the two colliding objects don’t just clip each other. Instead, at least 50% of one side is covered up after the collision.
This might help out: Unity - Scripting API: Collision.contacts
Thanks but i don’t understand what it mean for