Hey!
I have an object of which i want to make couple of clones that move independently of their master.
I am facing problem where when I call Instantiate there is a spawn of couple hunderds of clones which crashes my unity.
Any help would be appreciated.
#
Instantiate problem
I have an object of which i want to make couple of clones that move independently of their master.
I am facing problem where when I call Instantiate there is a spawn of couple hunderds of clones which crashes my unity.
Any help would be appreciated.
#
Code (JavaScript):
- #pragma strict
- var x:double=0.0;
- var meteor : GameObject;
- var y:double=0.0;
- var angle:double=0;
- var myArray = new Array();
- var l : GameObject;
- var flag=0;
- function Start ()
- {
- angle=Random.Range(0.1, 2);...