Hi,
I have a box collider that follows the camera. I want to count how many gameobjects were collided into the box collider. How do I do that?
Thanks!
Hi,
I have a box collider that follows the camera. I want to count how many gameobjects were collided into the box collider. How do I do that?
Thanks!
Add a counter to the box collider
int noOfHits;
void OnCollisionEnter (Collision col){
noOfHits++;
}