I have an orthographic car which is made from a rigidbody2d with wheeljoint2d’s and wheels. The car works fine, but I’m trying to snap the wheeljoints off when the car hits ground hard enough… the following code works for the front wheel, but how would I access the other wheeljoint2d?
function OnCollisionEnter2D(collision : Collision2D)
{
if (collision.relativeVelocity.magnitude > hitTolerance)
{
GetComponent(WheelJoint2D).enabled = false;
}
}