Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Destroyed prefab still moving

$
0
0
Hello. I am doing the example Space Shooter from tutorials and using Unity 4.3.4f1. According to the tutorial, clones should disappear from hierarchy view but mine is still there, only the triangle on the left disappears. But I see that the Z position of the clone is increasing, so I guess the object doesn't stop. Is this expected? I think I did everything same as tutorial. This is the code from tutorial: public class PlayerController : MonoBehaviour { ... void Update () { if (Input.GetButton("Fire1") && Time.time > nextFire) { nextFire = Time.time + fireRate; Instantiate(shot, shotSpawn.position, shotSpawn.rotation); } } ... } public class DestroyByBoundary : MonoBehaviour { void OnTriggerExit (Collider other) { Destroy(other.gameObject); } }

Viewing all articles
Browse latest Browse all 171066

Trending Articles



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