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

Bullets not destroying enemies

$
0
0
I'm going crazy, I have enemies flying along waypoints named and tagged as "Enemy" (i've tried by name and tag) my bullet code can knock them but doesn't destroy them. Bullet code is the following: public class bulletScript : MonoBehaviour { private void OnCollisionEnter(Collision collision) { Debug.Log(collision.gameObject.name); if (collision.gameObject.name == "Enemy") { Destroy(collision.gameObject); } } } Someone please help

Viewing all articles
Browse latest Browse all 1488

Trending Articles



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