I am trying to build a game where I want only red objects to collide with red ground, blue objects with blue ground and green objects with green ground. So if a blue object drops on a green/red ground, it should just fall through it.
I found IgnoreLayerCollision method in the internet but couldn’t get it to work. I am using FPS Character Controller’s scripts for physics. Help!
I’d set up the Collision Matrix for this in Physics Manager.
Create three layers called “Red”, “Green” and “Blue” and set the layer accordingly on your Red, Green and Blue objects. Set up the Collision Matrix so that Red only collides with Red, Blue only with Blue, Green only with Green and so on.
If you still don’t get it, I suggest that you check these links out too before asking: