Depending on the transit visa too. It comes in 2 forms: Visitor in Transit Visa (you can change airports and it's valid for 48 hours) and Direct Airside Transit Visa (only 24 hours and you need to stay "airside"). If you visa was issued under the BIVS scheme, you don't need a transit visa.
But...