Quantcast
Channel: Answers for "OnTriggerEnter Question"
Browsing latest articles
Browse All 4 View Live

Answer by Sebas

straight from the documentation:// Destroy everything that enters the trigger function OnTriggerEnter (other : Collider) { Destroy(other.gameObject); }As you can see there, the OnTriggerEnter function...

View Article



Answer by Detinator10

I know this is already answered but you could use: function OnTriggerEnter (other : Collider) { if(other.gameObject.layer == playerlayer){ //stuff here } } BTW the variable player layer is a LayerMask.

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images