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

Ignore individual collisions between two objects

$
0
0
I want to ignore collisions between an object and a special class of objects only when the collision contact point meets a few criteria. In other words: function OnCollisionEnter(other : Collision) { if (isSpecial(other.gameObject) && meetsCriteria(other.contacts[0].point)) { // Ignore this individual collision } } However, I don't want to use `Physics.IgnoreCollision(other.collider, collider)` because I want future collisions to still happen. Any thoughts? I will probably have to default to some kind of hackery where I remember what colliders I've ignored and then reenable collisions later, but I'd like to have a cleaner and less hacky solution. Thanks!

Viewing all articles
Browse latest Browse all 148

Latest Images

Trending Articles



Latest Images

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