転職を繰り返したサラリーマンの多趣味ブログ
id:uuc1h
【Unity】OnCollisionEnterの接触判定
ColliderコンポーネントのIsTriggerチェックは外しておく。 // コライダーとの接触判定 private void OnCollisionEnter(Collision other) { if(other.gameObject.tag == "Controller") { Destroy(gameObject); Destroy(other.gameObject); } }