Bounds.Intersects returns false while collision still works?
I'm passing my player's collider's Bounds into Bounds.Intersects(), but it returns false even when it's visibly overlapping with the BoxCollider2D I'm checking it against.
I even tested this by switching the target collider's isTrigger to false. Sure enough, the collision occurred and my character was pushed out of the box.
What could cause this?
Comment
Best Answer
Answer by TBruce · Apr 20, 2016 at 04:41 AM
Are the Z values the same?
Whoops! I thought I had tested that, but no, they weren't. It works now. Perhaps I should just use BoxColliders for these ins$$anonymous$$d of BoxCollider2D.
@_eternal
BoxCollider's are for 3D physic games and BoxCollider2D's are for 2D physic games.
Your answer