Collisions

I must be missing something silly, because in my mind it al seems to fit…

I’m trying to make 2 ‘objects’ hit. The both have a boxcollider attached, and also a rigidbody set to kinematic. I am constantly moving both objects by setting their respective transform.positions .
If you read here, last line of hints and plus the table, you can see that this should generate messages.

So to rule out any other random turmoil I made a very simple script:

using UnityEngine;
using System.Collections;
public class TrafficCollisionHandler : MonoBehaviour {
	void OnCollisionEnter(Collision colInfo)
	{
		Debug.Log("Boom! Collision!");
	}
}

But no matter what, I get no output. So what am I missing here guys?[/url]

Did you make sure that you clicked “Is Trigger” in the inspector for the game object?

You can see that this should not generate collision messages, actually.

–Eric

Please elaborate.

And in the table ‘Rigidbody Collider x Rigidbody Collider’ has a Y on the “Collision detection occurs and messages are sent upon collision”.

That’s not what you’re using, though. In the table, 'Kinematic Rigidbody Collider x Kinematic Rigidbody Collider" does not have a Y.

–Eric

Ah! See I knew I was missing something stupid.

Thanks for pointing out what.