Help using trigger - My item won't be destroyed and I keep going through it

Help! I am trying to collect an object and I just keep going through it without it being destroyed


using UnityEngine;
using System.Collections;

public class powerCell : MonoBehaviour {

public float rotationSpeed = 100.0f;
void Update () {
transform.Rotate (new Vector3(0,rotationSpeed * Time.deltaTime, 0));
void OnTriggerEnter(Collider other) {
if(other.gameObject.tag == “First Person Controller”) {



What am I doing wrong?? Thanks!!!

Your code looks fine to me.

Make sure one of the objects has a rigidbody
From Unity - Scripting API: Collider.OnTriggerEnter(Collider)
Note that trigger events are only sent if one of the colliders also has a rigidbody attached.

Is the isTrigger set
Make sure the isTrigger check box is in fact checked on the collider component.

z position
If this is a 2d style game. Make sure the depth (usually z) is in the right position

Recheck Collider Size