Unparent Character Controller from rigidbody?

Ok. As far as i understand, if i parent CharacterController to object, that have rigidBody and collider, attached to it, after that the OnTriggerExit doesn’t work because Unity is not checking the collisions between the children of rigidBody object…

Ok, but how can i check wheter the character controller is leaving the trigger, that makes him parented?

1: I have a box with 2 colliders (One cube and one capsule). The capsule is trigger. When the CC get’s inside the trigger area it get’s parented to the cube and after that the OnTriggerExit doesn’t detect the CharacterController anymore…

So any help on how i can check, when the character controller leaves the trigger collider?

thanks

If you want to check collision on a CharacterController, have a look at OnControllerColliderHit. To check if something has a parent or not,

if(transform.parent == null){print("No parent for Transform.")};