# My trigger does not detect my player

My trigger does not detect my player.
My Trigger.cs file:

using UnityEngine;

public class Trigger : MonoBehaviour {

public Camera camera1;
public Camera camera2;
public GameObject panel;

void OnTriggerEnter(Collider other)
{
camera1.enabled = false;
camera2.enabled = true;
panel.SetActive(true);
Debug.Log ("Entered-");
}

void OnTriggerExit(Collider other)
{
camera2.enabled = false;
camera1.enabled = true;
panel.SetActive(false);

}
private void Update()
{
if(Input.GetKeyDown(KeyCode.DownArrow) || Input.GetKeyDown(KeyCode.S))
{
panel.SetActive(false);

}
}

}


Where I can start troubleshooting te issue?
Object on which the trigger script is sitting on.

The solution:
-- I created two colliders, and assigned one as a collider, the other (bigger) is a trigger.
-- I also had problems with the small triggers in the scene. The triggers were to small to be detected by my main player, althought they detected my "sphere" player object

• I added the inspector for the object on which the trigger is sitting on. Is it legal to add one BoxCollider which has IsTrigger set to true, and one that has IsTrigger set to false? – S4NNY1 Jan 15 '18 at 18:52
• Yes. The trigger collider will fire trigger events, while the non-trigger collider will handle physics collisions. Make sure they don't completely overlap though, or the non-trigger collider might prevent objects from ever reaching & tripping the trigger collider inside. – DMGregory Jan 15 '18 at 18:54

You have to set IsTrigger to true on the BoxCollider. If this isn't set, it indicated that the box collider is only used for physics.
If you are trying to fire code when two objects collide, you need to use OnCollisionEnter, OnCollisionExit, OnCollisionStay