script on 1. cheking if 2. is coliding 3. Help!

ok, i need some help, i tried a few places and didn’t find what i was looking for, i need a script like this:

its on my camera, but checks if obj1, is colliding with an object with a certain tag

this is what i tryed:

void OnCollisionEnter(Collision retAdd){
if(retAdd.gameObject.tag == “BuildObject”)
{
print(“colliding!”);
}

retAdd is the object i want to chek if is colliding

It can’t be on your camera, it needs to be on the object that is colliding. It must have a collider on it, unless your camera has a collider on it.