trigger objects

so i have an empty gameobject in my game and i want it to drop and object from the sky when my player comes in contact with it. I have been using ontriggerEnter but its not working. help please.

Thank you!

Make sure that you have a collider component attached to the game object and that the "Is Trigger" flag is set to true on the collider. You can also check the OnTriggerEnter documentation for some more info.

An empty GameObject can't be a trigger, it's the collider which is the trigger. Just add a Collider and modify its size and center in the inspector (BoxCollider for a zone, or just a little shpere if you want a "trigger-point). Like TrolleFar said, be sure to check "isTrigger". Then add your script and it will work!

for OnTriggerEnter to work your gameObject should have some requirements. you should add a collider component and make it's "is trigger" property true. (check it in the inspector.) the important thing that others did not mention is that one of the parties in collision (either your moving object or the trigger) should have a rigidbody attached. the rigidbody could be a kinematic rigidbody if you don't want it to be a real physics based object. see the collision matrix for more info.