- Home /
Character Controller
if I have a character controller attached to a model, which will cause a trigger event when entering a trigger, the model or the character controller?
Answer by Owen-Reynolds · Nov 18, 2011 at 05:28 PM
Only takes a few minutes to set up a quick test. OnTriggerEnter for the player and the trigger, OnControllerColliderHit for each of them as well. Put things like Debug.Log("playerTrigger hit:" + col.gameObject.name);
inside.
If you test ControllerColliderHit, it will constantly hit the ground, so you may want to tag the ground and add: if(!col.CompareTag("ground"))
to weed those out.
I believe that the trigger detects a charController, and nothing else will detect anything, but I'd run my own tests -- it can depend on the set up.
Your answer
Follow this Question
Related Questions
Can't click gameobject when over another trigger? 1 Answer
Reset location on collision ? 1 Answer
Gun collision problem 3 Answers
How to make Character Controller triggered collider? 1 Answer