How to make paper 2D AI pawn oscillate while constantly moving to the left?

Hello,

I’ve been trying to create an AI similar to how one of the AI in the original Nintendo’s Gradius works where it bobs up and down like this:

334140-gradius-ai.gif

I’ve seen many tutorials and posts that do hovering on static meshes in 3D, but when I try to implement that logic to 2D it either doesn’t work at all or flings the pawn way up into the air.

The next few pictures are what I have so far which works to a certain extend; however, using this method doesn’t allow me to control how frequent the AI oscillates. I would like to increase the frequency. Any help would be greatly appreciated.

Sooo… I just learned there’s this thing called a “TimelineComponent” that makes everything 100x easier lol.