I have a scene with two players and both have colliders on them and are on different layers. They don't collide with each other. I tried making them on the same layer and also checked Physics menu. Still no change . Please help me....
Is it Collider 2D and not just Collider? And is Trigger set to false? You could post a screenshot if this doesn't help.
If you want the colliders to collide physically and not just to trigger you need to uncheck the Is Trigger checkbox. You can also read more about that here: https://docs.unity3d.com/Manual/CollidersOverview.html Read under Triggers.
Check these things: At least one of the colliding objects needs to have a Rigidbody2D set to Simulated Both need a Collider2D not marked as trigger Both need to be on layers that can collide, as per the Physics2D collision matrix
If you want more help, you'll need to provide more information. Perhaps screenshots for the inspectors for both objects, and your Physics2D collision matrix. In what way are you moving the objects?
If both player's rigidbodies are Kinematic, you need to check "useFullKinematicContacts" for kinematic/kinematic collisions to occur. https://docs.unity3d.com/ScriptReference/Rigidbody2D-useFullKinematicContacts.html
Code (csharp): pos += rot * velocity; transform.position = pos; This is how I move my player. Please someone help me out... I am less on the time left.
Fixed it!!! Rigidbody 2D in dynamic mode with Gravity Scale set to 0. Thanks for your time and efforts.