Collision not working at all [ABANDONED]

Ok, I’m getting a little pissed off because I can not for the life of me get this to work! I have a simple box (WITH COLLIDER) that is supposed to move towards a sphere (AGAIN WITH COLLIDER). Neither of them are triggers.

When the box hits the sphere, its supposed to print out “HIT!” in the debug log. Instead, it doesn’t do anything but shake around. (I know its supposed to shake, but its not registering a collision at all).

I have looked at every tutorial I can find with no luck. here is the code for the box:

var target1 : Transform;

var target2 : Transform;
var which = true;

function Update () {

if (which == true){
	transform.LookAt(target1);
}else{
	transform.LookAt(target2);
}	
transform.Translate(Vector3.forward * Time.deltaTime * 3);

}

function OnCollisionEnter(collisionInfo : Collision){
//which = false;
Debug.Log(“HIT!”);
}

Any Ideas? I don’t want to use Rigid Bodies since neither the box nor the sphere are supposed to be physics objects.

thankyou.

You have to use rigidbodies if you want collisions to work. See the chart on the bottom of this page.

You can make the objects RigidBodies, then toggle the Is Kinematic on.

This means that they will have access to the RigidBody functionality, but they won’t be affected by physics, just controlled by scripting.

If you don’t want to use rigidbodies you’ll need to to mark your objects as triggers.

Then use OnTriggerEnter to do your collision detection.

You could have two colliders per object:
One set for the physics(regular) and one for the collision detection(trigger). This would also give you the flexibility to change the hit detection for difficulty adjustment without getting different physics as a result.