vdfs n idk what else
This commit is contained in:
1 parent
51a9dccd97
commit
3c211a56fb
15 files changed
+130
-11
No files matched your search
@@ -10,13 +10,14 @@ public class ShipPhysics : MonoBehaviour {
|
||||
void OnCollisionEnter(Collision collision) {
|
||||
if (collision.gameObject.tag == "TrackLimits") {
|
||||
Debug.Log("Track Limits " + collision.gameObject.name);
|
||||
ship.Respawn();
|
||||
ship.OnTrackLimits();
|
||||
return;
|
||||
}
|
||||
|
||||
float totalForce = collision.impulse.magnitude / Time.fixedDeltaTime;
|
||||
Debug.Log($"mag {collision.relativeVelocity.magnitude}");
|
||||
Debug.Log($"impulse {collision.impulse} {collision.impulse.magnitude} {totalForce}");
|
||||
if (totalForce < 1f) return;
|
||||
ship.Damage(totalForce, collision.gameObject.name);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user