Hello Marcel, it seems you're working with Unity and trying to prevent collisions between two objects by adjusting the Layer Collision Matrix. Your approach is correct by setting the ball on the "Ball" layer and the wall on the "Default" layer, then disabling collisions between these two layers in the Layer Collision Matrix.
However, if you're still experiencing collisions, here are a few steps to double-check:
-
Ensure Layers Are Correctly Assigned: Verify that the ball is indeed assigned to the "Ball" layer and the wall is assigned to the "Default" layer. This assignment needs to be done in the Unity Editor by selecting each object and setting their layer from the dropdown at the top of the Inspector.
-
Recheck the Layer Collision Matrix: Go to Edit > Project Settings > Physics (for 3D) or Physics 2D (for 2D) and ensure the cell intersecting the "Ball" row and the "Default" column is unchecked. Sometimes changes might not save correctly or might be mistakenly re-enabled.
-
Check Child Objects: If your ball or wall has child objects, make sure that those children are also set to the correct layers. Layer settings on parent objects do not automatically propagate to children.
-
Collider and Rigidbody Settings: Ensure that both your ball and wall have their colliders and (if present) Rigidbody components correctly configured. For example, ensure that the ball's Rigidbody is not set to Kinematic if you expect it to respond to physics-based collisions (or lack thereof).
-
Scripted Collisions: Verify that there are no scripts dynamically changing the layer of the objects at runtime or manually handling collision responses that might override the Layer Collision Matrix settings.
thread_EWLRGQOu3DcA8qoxNRkwaJ0u