Quantcast
Channel: Questions in topic: "clone"
Viewing all articles
Browse latest Browse all 508

Triggers with clones not firing

$
0
0
Hi! Learning Unity I made a little asteroid killing game. It starts with one asteroid and at some point, it instantiates a clone of it so there are two in screen. I used this to check collision with asteroids: function OnTriggerEnter(other : Collider) { //Check who we collided with print(other.gameObject.name + " - " + other.gameObject.tag); if(other.gameObject.tag == "astroid") { print("Hit!"); } } The problem is that it triggers with the original asteroid but it doesnt with its clones. Also: Yes, the tag is "astroid".

Viewing all articles
Browse latest Browse all 508

Trending Articles



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