ontrigger being called by another trigger

Is this right…

For a test, I created a scene with 2 objects.
I have a cube that IS NOT set as a trigger with a script attached to it:

using UnityEngine;
using System.Collections;

public class triggerme : MonoBehaviour {

	void OnTriggerEnter() {
		print("triggered");
	}
}

The other object is a capsule that IS set as a trigger with a rigidbody (no gravity, is kinematic). It has the following script to force it to move through the cube:

using UnityEngine;
using System.Collections;

public class moveme : MonoBehaviour {

	void Update() {
		transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z-.03f);
	}
}

Am I supposed to be able to trigger the cube (not a trigger) with the capsule (is a trigger, but doesn’t have an attached trigger script)? I don’t want this to happen, but it is.

The way you have it set up, it doesn’t matter that the cube isn’t a trigger. It has a script that says when a trigger enters its collider (any other trigger), it will go off.

if you specify if(gameobject != capsule) and then do print(“triggered”); it shouldn’t activate upon the capsule entering the cube, but it will still run through the ontriggerenter method (it just won’t do anything that doesn’t meet requirements).

Thanks. Interestingly this occurrence never revealed itself in our iPhone build but does on our PC build.

And I decided to go with if(!collider.isTrigger) return; meaning that if this gameobject is not a trigger, then don’t follow through with the function.