Ladies and gentlemen, we can swim! These are five different animations combined in a blend tree, linked to programming logic that detects when the player is under water.
We have also implemented some optimalizations, as the game was suffering from 15 FPS lag spikes on Ultra settings. These have now been reduced to 50 FPS lag spikes by programmatically shortening the camera culling distance of small objects like grass and flowers: we don’t need to render flowers that are 500 metres away if they are barely visible with the naked eye from that distance anyway. The standard culling distance settings in Unity were too crude, but programmatically it’s possible to set the culling distance per layer, which gives us exactly the control we need.