Hi, I tried this script just to get an idea of how contact point works:
using UnityEngine;
using System.Collections;
public class CraneCollisions : MonoBehaviour
{
void OnCollisionEnter(Collision other)
{
print("Points colliding: " + other.contacts.Length);
print("First point that collided: " + other.contacts[0].point);
}
}
It worked the first couple times that I tried it, but now it isn't working. Neither of the objects that collide have a isTrigger checked and I don't know what else would stop it from working. Any ideas?? The only thing that I did between the time that it worked and the time that it didn't work, was change the collider size of the "other" object. I changed the collider back to the original size when I noticed the problem and it didn't magically make it work, so it must be something else because the objects are clearly colliding!!
Any help is much appreciated, Thanks!!
↧