Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

I am trying to get my Boss character to shoot a laser when the player enters a trigger that is attached to the boss.

$
0
0
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)); } }

Viewing all articles
Browse latest Browse all 1488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>