Use cake pans made by one brand. Different cake pan brands vary in size, so if you use a mix of different pans, your layers may not be even and will cause your cake to lean. Divide the batter evenly among your cake pans. The easiest way to do this is to measure the weight of the batter on a scale for each cake layer. If your layers are different sizes, your cake may end up leaning.