collider glitches (OnEnter, OnExit)

Hi there

I have some glitches I can not really retrace.

I have a Collider on my avatar. My avatar looks constantly at an object(the object stays within the collider).

But at random points of time the Colliders OnExit/OnEnter methods get called.

What could be the reason for that? Are there known problems with colliders?

thanks in advance

Maybe another collider collides with your collider? How do you use the colliders? As triggers(isTrigger=true) i guess? Don't forget to attach a rigidbody to the moving object.

You could place a Debug.Log into the OnTriggerEnter / OnTriggerExit functions and print the name of the colliding object

Resolved it recently.

My problem was that I moved my code to another project, where I did not set up the colliding layers!

Therefor they kept beeing triggered from all possible colliders.

Was a quick fix, but not an obvious one, because its easy to forget about something you set up once (and then leave it).