Collision not changing Variable

I have a boolean saying where a ball is going to go. When the ball hits an object, it chnages the variable and goes the other way. when it collides, the debug says it collided, but the bool isn’t changed.

using UnityEngine;
using System.Collections;

public class BallMovement : MonoBehaviour {
	float x;
	float y;
	bool d;
	Rigidbody rb;
	void Start () {
		rb = GetComponent<Rigidbody>();
	}
	void Update () {
		if (d) {
			Debug.Log ("true");
		}
		Move ();
	}
	void Move(){
		if (d){
			x = x + 0.1f;
		} else {
			x = x - 0.1f;
		}
		Vector2 v = new Vector2 (x,y);
		rb.MovePosition (v);
	}
	void OnCollisionEnter(UnityEngine.Collision col){
		Debug.Log("collided");

		if (col.gameObject.name == "P1C1") {
			d = true;
			Debug.Log("collided");
		}
	}
}

the debug never says “true”, and the ball doesn’t change direction. I will eventually use an integer for d.

Okay, i found the problem. For the box collider, I have it as a trigger, whcih i guess made it not collide. It was colliding with other object on it’s sides, P1C2 and P1C3 which were not triggers. Everything is working now.