public void ReleaseSoul(Soul soul) { //define direction float angle = Random.Range(60f, 120f); float x = Mathf.Cos(angle * Mathf.PI / 180); float y = Mathf.Sin(angle * Mathf.PI / 180); //Vector3 pointB = 10 * (new Vector3(x, y, 0)); //Vector3 pointA = soul.transform.position; Vector3 dir = new Vector3(x, y, 0).normalized; soul.FlyAway(dir); }