Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

How to check for number of colliders?

$
0
0
In my jenga game im setting up what happens when a block hits the floor, i want to set it so it basically says:
if 1 block hits the floor, thats fine, destroy the block
if more then 1 block hits the floor then do something else
how would i go about that?
here is my current code for that part
Code (csharp):
  1.  
  2.  
  3.  
  4.     void OnTriggerEnter(Collider other){
  5.         if (other.tag == "Block") {
  6.                         triggerhit = true;
  7.                         Destroy (other.gameObject);
  8.  
  9.                 }...
How to check for number of colliders?

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>