Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

onTriggerEnter not working?

$
0
0
My game has been coded so that when my ball reaches a capsule whose **isTrigger** property is checked, and is tagged **Collectible** the ball will fly upwards 100.0f. void onTriggerEnter(Collider other) { if(other.gameObject.tag=="Collectible") { rigidbody.AddForce(0.0f,100.0f,0.0f); } } However, when I tested it, the ball just passed through the capsule as if the code had no effect at all. Help please?

Viewing all articles
Browse latest Browse all 171066

Trending Articles



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