Quantcast
Channel: Questions in topic: "ignorecollision"
Viewing all articles
Browse latest Browse all 148

Object ignore collider with another - Please Help

$
0
0
So I have tried the following as suggested on another thread. void OnCollisionEnter(Collision collision) { if (collision.gameObject.tag == "theobjectToIgnore") { Physics.IgnoreCollision(theobjectToIgnore.collider, collider); } I'm trying to push a ball through a barrier, the ball is supposed to go through but not the character. The object is named Ball and the tag is also named Ball. So my script is as follows: void OnCollisionEnter(Collision collision) { if (collision.gameObject.tag == "Ball") { Physics.IgnoreCollision(**Ball**.collider, collider); } } the second ball though is red and it is not being detected via typing... can anyone help me?

Viewing all articles
Browse latest Browse all 148

Trending Articles



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