Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Collision destroy help.

$
0
0
Hey I have two gameObjects that's going to collide to eachOther I want to how to make one destroy the other on collision. Here is what I got. I'm new to coding. Also there is a error "Play". var Hit : GameObject; var sound : AudioClip; function OnCollisionEnter (collision : Collision) { if (collision.gameObject.tag == "Destroy"); Destroy (gameObject); Play.AudioClip; }

Viewing all articles
Browse latest Browse all 7934

Trending Articles



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