OnTriggerEnter not being called from a child

Hi,

I have a First Person Controller, with another cube parented to the FPC. This cube has a rigidbody attached to it, and also a very simple script in which I am trying to update a variable on another game object.

Below is the script:


public WeepingAI weepingAI;

		//Weeping Angel AI Stuffs:
		void OnTriggerEnter (Collider col)
		{
				Debug.Log ("In Trigger");
				if (collider.CompareTag ("WeepingQuadrant")) {
						weepingAI.inTrigger = true;
				}
		}
		void OnTriggerExit (Collider col)
		{
				if (col.CompareTag ("WeepingQuadrant")) {
						weepingAI.inTrigger = false;
				}
		}

However, when I run the game, even when the player enters the WeepingQuadrant (a large trigger zone), nothing happens, and no “In Trigger” logs are made. The WeepingAI Script is attached in the inspector.

I’ve completely run out of ideas as to why… :frowning:

Any help would be greatly appreciated.

Thanks,

IEMatrixGuy out.

Hello,

Please check the following,

  1. Make sure that the collider has ‘isTrigger’ enabled.
  2. If above is true then check for rigid bodies. See OnTriggerEnter
  3. Also check in Editor/Physics settings whether you have disabled collisions for the colliding object layers.