Inducing self-motion illusions referred as vection are critical for improving the sensation of walking in virtual environments (VE). Adding viewpoint oscillations to a constant forward velocity in VE is effective for improving vection strength under static conditions. However, the effects of oscillation frequency and amplitude on vection strength under treadmill walking conditions are still unclear. Besides, due to the visuomotor entrainment mechanism, these visual oscillations would affect gait patterns and be detrimental for achieving natural walking if not properly designed. This study was aimed at determining the optimal frequency and amplitude of vertical viewpoint oscillations for improving vection strength and reducing gait constraints. Seven subjects walked on a treadmill while watching a visual scene. The visual scene presented a constant forward velocity equal to the treadmill velocity with different vertical viewpoint oscillations added. Five oscillation patterns with different combinations of frequency and amplitude were tested. Subjects gave verbal ratings of vection strength. The mediolateral (M-L) center of pressure (CoP) complexity was calculated to indicate gait constraints. After the experiment, subjects were asked to give the best and the worst oscillation pattern based on their walking experience. The oscillation frequency and amplitude had strong positive correlations with vection strength. The M-L CoP complexity was reduced under oscillations with low frequency. The medium oscillation amplitude had greater M-L CoP complexity than the small and large amplitude. Besides, subjects preferred those oscillation patterns with large gait complexity. We suggested that the oscillation amplitude with largest M-L CoP complexity should first be chosen to reduce gait constraints. Then, increasing the oscillation frequency to improve vection strength until individual preference or the boundary of motion sickness. These findings provide important guidelines to promote the sensation of natural walking in VE.