Object won't fall when colliding with a wall when jumping

Hi,

I have a problem with my 2D platformer game. When my character is jumping or falling and it collides with a wall it just stays there and doesn’t fall. My character is using circle collider for feet (for walking) and also box collider for body.

I tried some raycasting solution to detect wall before colliding it but it didn’t worked…

Thanks for advice! I put left and right colliders as triggers. Here’s the code:

public class CharacterWallSensor : MonoBehaviour {

	public bool isRightSensor = true;
	public float bounceForce = 500;
	public Rigidbody2D character;


	void OnTriggerStay2D(Collider2D col) {
		if (col.gameObject.layer == LayerMask.NameToLayer ("Ground")) {
			if (isRightSensor)
				character.AddForce(new Vector2(-bounceForce, 0));
			else
				character.AddForce(new Vector2(bounceForce, 0));
		}

	}
}