I Have a model 3d in the scene, and I put a BoxCollider, and a script for detect collision but doesn’t work, when I try to put a Debug, nothings happend!!! why !!!??
Thanks for your help
this is the script for now
void OnCollisionEnter(Collision collision) {
Debug.Log(collision.gameObject);
}
save
June 14, 2011, 4:53pm
2
Make sure that you’re using the right method for its purpose, in other words check the Collision action matrix on the bottom of the page.
Make sure your collider is NOT marked as a trigger.
Also try changing your code to show the name of the object being collided with…
i.e
Debug.Log(collision.gameObject.name);
I forgot to put the rigidbody. Thanks