I have tested a script that triggers an animation via a collider. And it worked pretty well. However, when i put the same script on my character, wich has a rigidbody. It doesn't work. I changed the tags and names. It looks ok to me. but it just doesn't respond. Even the print-message don't work.
I also tried to add an capsule-collider. But that doesn't work either. Anyone had the same problem? I can't figure out what's going wrong. I DO get the message "NullreferenceExecption. But i can't see what's wrong. Any idea's?
asked Jul 17 '10 at 03:10 PM
many times the problem is not where you think. the other parts of the code has problems. if users post their codes it can be detected by others.
sometimes when you have rigidbodies your colliders are not trigger (i.e their is trigger is off) so OnTriggerEnter don't work and you should use OnCollisionEnter or make the collider a trigger.
answered Jul 17 '10 at 04:04 PM