Genuinely no clue what I changed

This commit is contained in:
2024-12-15 16:33:32 -08:00
parent 9eed55d57b
commit 3a5c28cd43
13 changed files with 6734 additions and 219 deletions

View File

@@ -13,6 +13,7 @@ public class Discharge : MonoBehaviour
boomRadius
)) {
if (hit.attachedRigidbody == null) continue;
hit.attachedRigidbody.linearVelocity = Vector3.zero;
hit.attachedRigidbody.AddExplosionForce(
boomForce,
transform.position,
@@ -23,4 +24,14 @@ public class Discharge : MonoBehaviour
}
Destroy(gameObject);
}
void OnCollisionEnter(Collision col) {
foreach (Collider hit in Physics.OverlapSphere(
transform.position,
1F
)) {
if (hit.tag == "Player")
GetComponent<Rigidbody>().linearVelocity = Vector3.zero;
}
}
}