【Unity】OnCollisionEnterの接触判定

ColliderコンポーネントのIsTriggerチェックは外しておく。 // コライダーとの接触判定 private void OnCollisionEnter(Collision other) { if(other.gameObject.tag == "Controller") { Destroy(gameObject); Destroy(other.gameObject); } }