Collision Detection not working

I am trying to make pong, and right now i am working on collision detection. I tried all kinds of functions, like OnCollisionEnter, OnCollisionEnter2D, OnTriggerEnter, OnTriggerEnter2D. nothing seems to work.

using UnityEngine;
using System.Collections;

public class BallMovement : MonoBehaviour {
	public float x;
	public float y;
	bool d;
	Transform tf;
	void Start () {
		tf = GetComponent<Transform>();
		d = false;
	}
	void Update () {
		Move ();
	}
	void Move(){
		if (d == true) {//i also tried just "if (d)", but still the same movement
			x = x + 0.1f;
		} else {
			x = x - 0.1f;
		}
		Vector2 v = new Vector2 (x,y);
		tf.position = v;
	}
	void OnCollisionEnter(Collision col){
		Debug.Log("collided");
		if (col.gameObject.tag == "P1C1") {
			d = true;
			Debug.Log("collided");
		}
	}
}

The debug says that the function is never called.

Do you have a rigidbody and collider on your ball?

Also the way your moving the ball won’t work with the on collision enter event. You need to use MovePosition. Unity - Scripting API: Rigidbody.MovePosition