I am trying to get my Boss character to shoot a laser when the player enters a trigger that is attached to the boss. Right now when I enter this trigger it does nothing and I am not sure why. This is the code I have on the player right now:
function OnTriggerEnter(col:Collider)
{
if(col.gameObject.tag == "laserTrigger")
{
Debug.Log("Hitting the trigger box");
Instantiate(bossLaserBeam, transform.position + new Vector3(-11,0,0), Quaternion.Euler(90,0,0));
}
}
↧