Rigidbody not working properly/unity

i have two objects a player and a wall
the player is passing through the long side of the wall but it collided with the shortside of the wall
i want the player to collied with whole wall
it is so frustating