Character Controller
Inspired by the desktop and console remakes of Rayman by Ubisoft, Udders doesn't have thighs or calves, only feet. The goal was to create a fluid, responsive, dynamic character, during both combat and platforming, in the like of Rayman. This required lots of detail in the animation, and robustness of controls.
Locomotion and skeletal animation
The locomotion is based on a Rigidbody2D component, but with all default physical forces disabled. Instead, the velocity is manually calculated and applied using Rigidbody2D.MovePosition, allowing for collision detection. The remaining interactions, such as collisions with other rigidbodies or objects used for platforming such as the spring, are stored and layered on top of player input.
As the prototype was developed when the 2D tools of Unity have only started to be released, the skeletal rig is loaded and handled using the Puppet2D AssetStore package. The character consists of several overlaid elements, with either a static sprite or a sprite-sheet, linked together by bones. All animation playback is controlled manually through code; the speed and direction of the feet, position of the ears based on vertical velocity, and inverse kinematics for gun control.
Effects
Udders is a space-faring cow, but still sticks to his guns, so all of his effects are milk-based. He uses either a regular whole-fat milk or charged-up plasma milk for his guns.
Milk simulation
The milk effects use an alpha-based metaballs approach, which can be rendered with high performance in 2D. Each type of milk is rendered on its own layer using a separate camera to and stored as a RenderTexture. This allows for many different systems to be used, like a particle system, rigidbodies, skeletal rigs of milk-monsters, ..., in combination with one another, allowing for complex effects. The colour information from each rendered layer has a gradient shader applied, mapping between two colour gradients.
The examples below use many circles, each with a radial gradient, going from fully opaque in the middle, to fully transparent at the edges, mapped to white if above a certain alpha-cutoff threshold.
The gun shots' particles are also alpha-based, but mapped instead to a complicated gradient, which goes from white to blue, then sharply changes to a light blue and fades out, resulting in the appearance of semi-discrete glowing blobs.
Flair
In the spirit of the Rayman games, the character animations has lots of details. The face has several bones, which react to gameplay, without affecting it, like faking physics of checks and hair by scaling of bones. The facial expression can also be changed in the same fashion, by swapping and morphing sprites.