Character Controller Collider set to isTrigger

The Character Controller is a Collider. So, in theory it should be possible to be set as a trigger. However, in practice if you set it as a trigger through script (not possible in the Inspector), its behavior is weird. You cannot go through it (as you would a trigger), but yet it triggers OnTriggerEnter events (randomly).

The scripting reference, shows that isTrigger is an Inherited member/Inherited Variable for CharacterController. So, the following script:

using UnityEngine;
using System.Collections;

public class SetTrigger : MonoBehaviour
{
    private CharacterController controller;

	// Use this for initialization
	void Start ()
	{

	    controller = GetComponent<CharacterController>();
        controller.isTrigger = true;

	}
	

    void OnTriggerEnter(Collider other)
    {
        print("Trigger was Hit");
    }
}

…when attached to a game object with a character controller should make it behave as a trigger… … but it doesn’t.

In fact, when debugging this, it can be seen that the CharacterController gets isTrigger set to true. However, a First Person Controller (with another Character Controller) stops upon collision, instead of going through it (as a trigger). Nevertheless, it fires -occasionally- an OnTriggerEnter event.

Is this a bug? Am I missing something, or what?

After submitting a bug report, I finally received a response from Unity QA:

  1. Although the isTrigger flag of the CharacterController can be set to true in script, the CharacterController is not meant to be used as a trigger. Setting of the isTrigger flag in script will be disabled by Unity.
  2. CharacterController inherits several members from Collider, i.e. isTrigger, OnTriggerEnter, OnTriggerExit, OnTriggerStay. However, these should not be used in code. Unity will update the relevant documentation to clarify this.