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