Quantcast
Viewing latest article 15
Browse Latest Browse All 51

How can I count the number of objects touching a collider and then destroy them?

Hello all, I have a simple game where tennis balls fall down from off the screen and into a bucket. The player is on the side shooting projectiles at the balls trying to knock them out of the bucket's path. I want to create a script where every 30 seconds the bucket gets "emptied" only if 7 or less balls are allowed in, if at the 30 second mark 8 or more balls are allowed in, then the game ends, you lose and its game over. It's fairly simple. I'm fairly new to Unity and also to c# so the simpler the better. Thank you so much for taking the time to read this!

Viewing latest article 15
Browse Latest Browse All 51

Trending Articles



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