Linecast not work when are dectected other collisions ?

I have this code for to know if the character is running on gGround layer

Physics2D.Linecast(transform.position,contact.position,1<<LayerMask.NameToLayer("Ground"));

but it not work when the character runs over an oblique object (like into the image below). I think that the problem are the others two character’s colliders because if I delete they the linecat detect when the character is on Ground layer.

How can I solve this problem ? I can’t delete the others two colliders…

Instead of linecasting towards the small “foot” collider, could you test for intersections with the foot?
(with Unity - Scripting API: Physics2D.OverlapAreaAll)

No, I have used linecast and now I must change the logic of the game…but why linecast not work ? Unity prject https://www.assetstore.unity3d.com/en/#!/content/11228 use linecast and there are oblique object and work fine…

Anyone can help me ?

The linecast goes from the middle of the player to the middle of the contact object. Therefore if hits the collider of the contact object first before reaching the middle of the contact object. Since you are casting on a specific layer it should not hit the collider of the contact object - but it still does. So the only error I can imagine is, that your player/foot object is in the same layer as the ground. This must not be!