When my gameobject GameBox touch another gameobject GameBox for first two time,
it will add score, but if more than 2 times touch,
it cannot add score,
why this happen?
am i write something wrong?
void OnCollisionEnter(Collision col)
{
if (col.gameObject.tag == "GameBox")
{
col.transform.rigidbody.constraints = RigidbodyConstraints.FreezeAll;
AddScore();
}
}