Parachutes and Catapults

People have been asking for parachutes since the original game jam version of When Pigs Fly.  I teased chutes with the parachickens in v0.2, but now I'm adding them for real in v0.3.  Since the first post-jam update, I've been keeping the code behind When Pigs Fly as modular as possible.  This allowed me to re-use the parachute code from the parachickens.  The implementation is very simple, but it seems to work pretty well.

When the player presses the key to deploy the chute, it starts this coroutine:

IEnumerator UpdateChute()
{
    float t = 0f;
    while(t < deploymentDelay)
    {
        t += Time.deltaTime;
        yield return null;
    }

    parachuteModel.gameObject.SetActive(true);

    t = 0f;
    while(t < deploymentTime)
    {
        parachuteModel.localScale = Vector3.Lerp(Vector3.zero, maxParachuteScale, t / deploymentTime);
        rigidbody.drag = Mathf.Lerp(0f, parachuteDrag, t / deploymentTime);
        parachuteModel.LookAt(transform.position - rigidbody.velocity);
        t += Time.deltaTime;
        yield return null;
    }

    parachuteModel.localScale = maxParachuteScale;
    rigidbody.drag = parachuteDrag;

    while(rigidbody.velocity.magnitude > 0.5f)
    {
        parachuteModel.LookAt(transform.position - rigidbody.velocity);
        yield return null;
    }

    parachuteModel.gameObject.SetActive(false);
}
All the parachute does is raise the rigidbody's drag value.  Then, every frame, the parachute model is rotated to look along the negative velocity vector of the rigidbody.  The parachute starts doing weird things once the pig hits the ground and stops, so I simply disable the model once the magnitude of the velocity is below a certain threshold.  

I needed a quick way to get the pig up to altitude to test the new chutes.  Sure, I could just change the spawn point to a higher point, but where's the fun in that?  Instead, I built this pig catapult thing.  The first few iterations spun themselves apart, and I ended up having to up the break force on the joints (cheating).  I want players to be able to build crazy stuff like this, so it looks like I'm going to have to add some stronger structural parts in the future.