Collisions happening though disabled in matrix
In my game I have a vine for a player to swing on, and I recently tried adding small knobs for the vine to hinge on. I added colliders to the vines that should only collide with the knobs, and made new layers - "Knobs" and "VineColliders".
the problem is that even though the VineColliders are set to collide only with the knobs in the (2D) layer collision matrix, im (sometimes) getting collisions with another layer - "platforms". I've set some debug messages to ensure that it was indeed these two layers colliding and not another collider i didnt notice, and double checked the collision matrix, and tried disabling all 3d collisions to see if that had something to do with it (the game is 2D). I've also looked around on google for a while for similar issues- no dice.
maybe using IgnoreLayerCollision programmatically would fix this, but that seems over the top for this, since it really seems like this shouldn't happen.
So why is this happening?
Thanks in advance to all helpers!
screens:
Answer by SuperSpasm · Aug 24, 2016 at 12:10 PM
In the end I found out what was causing my collision issues, since I had a really hard time with this and didn't get any answers I figured I'd post it here in case anyone has similar issues in the future.
On my branch I had a Platform Effector which I used for one way platforms. as it turns out, the platform effectors have a collision mask that can override the global collision-by-layer matrix.. I was not aware of this. Anyhow, it seems like disabling the collider mask on all branches involved did the trick. However- I really think that the collider mask on these should be disabled by default, since while they may come in handy, if you miss that option and set up your collision matrix perfectly, collisions become very unintuitive and it's hard to see what went wrong.
Wow, I would have never found it if it was not for your self answer.
thank you! And i thought iam stupid. It was the collidermask.....
well it was me being stupid, but the problem was the collidermask
Thanks man. I've been stuck on this for 3 days. Best solution for me ^_^
I just want you to know that you just saved me, 5 years after you posted this! Thank you so much for describing your problem here and your solution.
I had this EXACT set up and could not understand why the collision was happening. Had no idea effectors override project settings!
Answer by ton1n8o · Jul 08, 2017 at 06:43 AM
I've faced this problem but for me, I was configuring the wrong Physics Matrix system, the 3D one rather than the 2D.
Haha! $$anonymous$$y god it was so simple in the end. Yet I was banging my head against the wall. ($$anonymous$$etaphorically of course). Thanks for the tip. 2D... I need to start remembering there's 2 world's...
Your answer
Follow this Question
Related Questions
Pick up code issue 1 Answer
OnCollisionExit2D strange behaviour 0 Answers
OnCollisionEnter2D is not being called 0 Answers
Need Help with Jump Coding 0 Answers
Problem with OnCollisionEnter 2 Answers