Hi,
I’m just investigating the use of triggers in my game. But I’m a stumped at what’s happening.
-
I’ve got object A with a rigid body component
-
I’ve got object B with a box collider component, with isTrigger ticked in the inspector.
From my understanding of triggers, when object A hit object B, Trigger events get fired.
I’ve added the following scripts to object B.
function OnTriggerEnter (col : Collider)
{
print (“on trigger enter”);
}
and similar for OnTriggerStay, OnTriggerExit, and OnCollisionEnter.
The print message is never displayed, so nothing is firing. However, when I move Object A over Object B, it stops dead - as if it’s hit something - so they must be interacting somehow.
the rigidbody has use gravity = false, and is kinematic = no (though I’ve tried each combination).
is there anything obvious I’m missing?