So, a bit of an odd one.
Horizontal sine causes an object to move left and right along the X axis.
Vertical sine causes an object to move up and down along the Y axis.
Forwards and backwards causes an object to move... well, back and forth, along its own current angle.
Is there a way to make an object move from side to side along its own current angle?
Like, if the object's angle were 0 or 180, it would sine up and down, but if its angle were 90 or 270 it would sine left and right, and so on for other / more diagonal angles.
I'm trying to make a weapon that does this: https://i.imgur.com/FgD8U1v.gif
but can be fired at wherever the mouse is and still maintains that pattern. Currently it only works horizontally, and I could manually configure it to switch sine styles when shooting vertically, but there's no clean way I can see to keep that movement pattern on diagonal angles.