A general new technique to solve the two-center problem with arbitrarily oriented deformed realistic potentials is demonstrated, which is based on the powerful potential separable expansion method. As an example, molecular single-particle spectra for (12)C+(12)C-->(24)Mg are calculated using deformed Woods-Saxon potentials. These clearly show that nonaxial symmetric configurations play a crucial role in molecular resonances observed in reaction processes for this system at low energy.