Wow! Somebody did look at my post
From what I remember it isn’t covered in the course. That effect is very easy to accomplish. Basically you enable gravity and kick the ship ;-). Technically in CollisionHandler I’ve added FallDown() method, which is called from StartDeathSequence() that looks like that:
private void FallDown()
{
Rigidbody rb = GetComponent<Rigidbody>();
rb.useGravity = true;
rb.AddForce(Vector3.down * 100, ForceMode.Impulse); // TODO extract for customization
rb.AddForce(Vector3.forward * 50, ForceMode.Impulse);
Collider[] colliders = GetComponentsInChildren<Collider>();
foreach (Collider c in colliders)
{
c.isTrigger = false;
}
}
(now that I see it I should have do the math and and call AddForce just once. Probably it was late at night when I was coding ).