Example #1
0
        void InitializeBall(WeaponBall ball)
        {
            var qRight = Quaternion.AngleAxis(Random.Range(0f, 360f), firePoint.forward);
            var right  = qRight * firePoint.right;
            var dir    = Vector3.Lerp(firePoint.forward, right, angle / 90f * Random.value).normalized;

            ball.SetVelocity(dir * ballSpeed);
        }
Example #2
0
 void InitializeBall(WeaponBall ball)
 {
     ball.SetVelocity(firePoint.forward * ballSpeed);
 }