I got a box that suppose to get destroyed when it collides with the First Person Controller.
I get an Error:
Script error: OnCollisionEnter
This message parameter has to be of type: Collision
The message will be ignored.
What am I doing wrong? I put the script on the box. When the FPC touches it nothing happens.
function OnCollisionEnter (theCollision : Collision)
{
if (theCollision.gameObject.name == "First Person Controller")
{
Destroy (gameObject);
}
}