The one ways that you go UP through i understand but what about going SIDEWAYS I can’t get that. BUT without making an object stop moving?
link to game level boss fight https://flowlab.io/game/play/709157 Metal Sonic
Look up crimson Hunters, its generally a game I use as testing grounds, but I made the first ones there. They may be helpful to you