Quantcast
Channel: Answers for "Balls Collision and Destruction = Higher Score. HELP ME?"
Viewing all articles
Browse latest Browse all 6

Answer by An-Item

$
0
0
void OnTriggerEnter(Collider collison) //your parameter name collision { if(other.gameObject.tag == "Ball") //but you call other instead { other.gameObject.SetActive(false); count += 1; SetCountText(); Debug.Log ("Score" + count); Destroy(gameObject); // do you need to destroy the finish line ? } } try this: void OnTriggerEnter(Collider other) { if(other.gameObject.tag == "Ball") { other.gameObject.SetActive(false); count += 1; SetCountText(); Debug.Log ("Score" + count); } }

Viewing all articles
Browse latest Browse all 6

Trending Articles



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