Pull request #43: Fix invisble bullets
Merge in CEGJ/creative-jam-20 from Soulaha to main * commit '648d6cd402438c7ba2f7aa4cd69eaa90af892362': Fix invisble bullets
This commit is contained in:
commit
0b0192b5fa
@ -68,6 +68,7 @@ public class CannonScript : MonoBehaviour
|
||||
proj = Instantiate(projectile, cannon.transform.position, cannon.transform.rotation);
|
||||
proj.GetComponent<Projectile>().SetDamage(damage);
|
||||
proj.GetComponent<Rigidbody>().AddForce(cannonForce * (lookDir+offsets[i]), ForceMode.Impulse);
|
||||
proj.layer = GameManager.Instance.GetCurrentLayerID();
|
||||
if (Physics.Raycast(transform.position, (lookDir+offsets[i]), out hit, Mathf.Infinity))
|
||||
{
|
||||
Debug.DrawRay(transform.position, (lookDir+offsets[i]) * hit.distance, Color.yellow, 0.5f);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user