public void Fracture(AsteroidController target) { int count = 3; float angle = 2 * Mathf.PI / count; for (int i = 0; i < count; ++i) { GameObject ast = Instantiate(m_asteroidPrefab); AsteroidController astCont = ast.GetComponent <AsteroidController>(); Rigidbody rb = ast.GetComponent <Rigidbody>(); //rb.AddForce(pos -target.transform.position, ForceMode.Impulse); astCont.SetTexture(m_astroidTexture); } Destroy(target.gameObject); }