About Physics2D.Raycast with objects in the same layer

Hi,

Let’s say I have 3 layers: default, solid and terrain.
I am performing a raycast filtering with layer mask, from a moving object to the floor. I am filtering including terrain and solid layers only. If the moving object is in any of the layers filtered I get different results (for example hit.fraction) than if the moving object is in a different layer (default or any other). I am performing raycast in a FixedUpdate.
Does this make any sense for any of you? Is there any known issue when raycasting between objects in the same layer?
P.S. I am discarding “self” object.

Thank you!

Although I don’t really find the relation… by unchecking the “start in collider” box in settings as explained here Raycast 2D with origin inside the collider - Questions & Answers - Unity Discussions kind of solves the weird issue…