📜  统一弹丸传播 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:12.089000             🧑  作者: Mango

代码示例1
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);