How can I do to move the pawn in a zigzag pattern?

Hi!

I’m using this to move a Pawn, but it moves in a straight line. How can I make it move in a zigzag pattern?

This pawn is an enemy in a Space Shooter game.

I know I have to use the sine function, but I don’t know how to do it.

Thanks!

Sin repeat speed = sin cycle speed

Sin value = amount of sideways movement

1 Like