Getting a smooth sine wave movement
I'm trying to make the enemy go down in a sine wave movement (a smooth zig-zag), the things highlighted in the red box are the problematic part, the enemy currently goes downwards to the right diagonally and never goes to the left like I imagined it should. I've tried messing with the numbers, but it still went downwards to the right. I appreciate all the help.
asked Apr 29 '18 at 07:34 PM in Using UE4
your sine is constants, so your Y is always 0.099 x 1000 = 99. That's way your actor move only in right. Try to connect GetGameTimeSinceCreation or GetGameTimeInSeconds to your sine. I think you get a better result when you use cos instead of sin. You can also move your actor through AddActorLocalOffset.
answered Apr 29 '18 at 09:42 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here