Shooting in sine wave

I want the player to shoot in a sine wave. I’m fiddling with translation, velocity, force, etc, but here’s what I have

speed * Mathf.Sin(time * frequency + start * Mathf.PI) * (direction + (Vector2)transform.right)

Now the issue with this is that the direction (it’s a vector) doesn’t actually apply the direction. Like say, if I have a bullet traveling with the direction vector (0.5, 0.5) (this is at 45 degrees) and I want it to go in a direction of (0, 1) (up) from there, then it should travel at (-0.5, 0.5) (135 degrees I think?).
9140638--1269841--upload_2023-7-11_21-30-38.png
Red arrow is the direction the bullet is traveling in (transform.right), blue arrow is the oscillation direction (vector2), black arrow is the actual direction the bullet will oscillate. It would be best normalized, but if that’s computationally expensive I can live without it.

More generally, I need a script that lets me move an object with a direction vector relative to transform.right

Nevermind, it seems the solution was replacing the direction vector with a direction angle and using

(Quaternion.Euler(0, 0, directionZ) * transform.right)

Although, I’m not sure how optimal it is to do this for bullets, but it does work.