function OnCollisionEnter(theCollision : Collision){
if(theCollision.gameObject.tag=="playerMissle") {
Destroy(gameObject);
}
}
This script keeps giving me a:
Script error: OnCollisionEnter
This message parameter has to be of type: Collision
The message will be ignored.
The gameobject it is placed on is a cuble with a box collider, rigidbody (that is kinematic), and the player missle is a prefab cube that is fired that has a box collider, rigidbody without kinematic, and is in the tag “playerMissle”.
Everyone keeps saying use this to check collision and destroy and object but I get this error everytime.