Answers for "unity projectile spread"

C#
1

unity projectile spread

Quaternion spread = Quaternion.Euler(transform.rotation.eulerAngles + new Vector3((Random.Range(-amount, amount), Random.Range(-amount, amount), 0f));

GameObject bullet = Instantiate(bulletPrefab, transform.position, spread) 
                                     
bullet.GetComponent<Rigidbody>().AddRelativeForce(Vector3.forward * Force);
Posted by: Guest on July-22-2020

C# Answers by Framework

Browse Popular Code Answers by Language