-2

i have this wall and would like to turn off the kinematics thats holding up each brick using any type of collision any ideas?enter image description here

1 Answers1

0
public GameObject cube;


private void OnCollisionEnter(Collision collision)
{
    if (collision.gameObject.CompareTag("KineOff"))
    {     
     Rigidbody cubeRigidbody = cube.GetComponent<Rigidbody> ();
     cubeRigidbody.isKinematic = false;
    }
}
Safrosoft
  • 14
  • 4