Problem with OnTriggerEnter of SphereCollider and CharacterController

The OnTriggerEnter of a SphereCollider itsnt detecting collision with CharacterController that isnt moving, and works fine if the Character is moving. Im using C#.

Thats the code im using on the Object with the SpherCollider:

void OnTriggerEnter(Collider col) { ... if(col.gameObject.tag == "Actor") { ... } }

The gameObject with the tag actor have a CharacterController with a BoudingBox.

I don't know if it helps if you put the code into the character and use the "ControllerColliderHit"

2 Answers

2

i have exactly the same problem :( have you found a solution?

@UnityProgrammer23
Hi, I have the following setup and it works:

ShpereCollider, IsTrigger checked. In same component the script with the Event OnTriggerEnter.

Btw you don’t need the bounding box for this case at least