MotoGP: crash camera

Originally posted to Shawn Hargreaves Blog on MSDN, Friday, January 30, 2009

The most complicated part of the MotoGP rider animation was the crash sequences. These were controlled by the physics engine, which modeled the rider as a simple sphere, computing how it should slide, tumble, and bounce off obstacles. The animation system did its best to keep up with these physics computations, stringing together many short animation clips to make the body twist and limbs flop about in a hopefully plausible way.

The resulting crash animations looked ok, but not as dramatic as we were hoping for.

For MotoGP 2, Damyan decided that instead of spending a lot of time trying to improve the animation code, he could get more bang for buck by changing the camera. He implemented what we called the "Blair Witch Cam", which was activated when the player crashed. This was low to the ground, with a ton of random jitter and deliberately bad target tracking, so it looked like a shaky handheld.

It worked. Without changing a single line of animation code, the crashes looked far more dynamic and exciting.

The only problem came at the end of the crash sequence, when the rider finally stopped sliding. We had no special animations for this situation, so they just flopped down and lay still, which looked pretty silly.

In reality, many things could happen at this point. The rider might get up, in which case they would usually act pissed off, or they might be injured, in which case a stretcher crew would soon be on the spot.

The solution was a simple piece of logic in the crash camera code:

    if (rider->HasRunOutOfAnimationsToPlay())
    {
        cameraTarget = bike;
    }

If something looks silly, just look a different way so the player won't see it!

Blog index   -   Back to my homepage