Hey guys! when i’m colliding with a cube its supposed to say in console but nothing shows up i have the cube tagged NPC This is my code
private GameObject triggeringNpc;
private bool triggering;
void Update()
{
if (triggering)
{
print("Player is Triggering with " + triggeringNpc);
}
}
void OnTriggerEnter(Collider other)
{
if (other.tag == "NPC")
{
triggering = true;
triggeringNpc = other.gameObject;
}
}
void OnTriggerExit(Collider other)
{
if (other.tag == "NPC")
{
triggering = false;
triggeringNpc = null;
}
}`