📅  最后修改于: 2022-03-11 14:49:12.089000             🧑  作者: Mango
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().AddRelativeForce(Vector3.forward * Force);