Quantcast
Channel: Answers for "Collision counter"
Browsing latest articles
Browse All 4 View Live

Answer by Priyanshu

Considering all the requirements for Collision to occur are fulfilled. Whenever an Object collides with the Object (with the script), OnCollisionEnter event will be called. To get a counter that counts...

View Article



Answer by Digital-Phantom

You basically said it yourself in the comment. make an int variable (collisionCount) then in your collision code just add void OnCollisionEnter(Collision2D collision) { //Do whatever else you need to...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images