So I have a Torch Light mechanic where when you shine the torch on specific points it’s meant to show an object, but the Torch Light is a trigger object. This is the code I have so far which isn’t working, I have also replaced the L_O_S (Line_Of_Sight) with the player object and it worked, I am getting quite confused, if anyone has any ideas on how I could go about doing this it would be greatly appreciated. the code has been put on the point of interest which is also a trigger.
public class Point_Of_Interest : MonoBehaviour
{
public GameObject Item_Dropped;
// Start is called before the first frame update
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == "L_O_S")
{
Debug.Log("Object found");
}
}
}