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

need help with colision problem

$
0
0
I made this code but the colision part is not trigered using UnityEngine; using System.Collections; public class Bullet : MonoBehaviour { //fly speed public float speed = 2000.0f; //explosion prefab (particles) public GameObject ExplosionPrefab; void OnColisionEnter(Collision col) { Object.Destroy(gameObject, 2.0f); Instantiate (ExplosionPrefab, transform.position, Quaternion.identity); print ("it works"); } }

Viewing all articles
Browse latest Browse all 7934

Trending Articles



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