So far rotating the camera works fine, but when moving forward with “W” it seems to move at the wrong angle, I’m guessing this is a problem with my math, but what’s the problem? Both pieces of code are within “Update”.
You don’t need to do that sort of math. The transform.forward vector points in the direction the object is facing. You just need to update the position, taking that direction into account…
Mixing radians and degrees. Built-in Unity functions, such as transform.Rotate, use degrees. But real math functions, such as cosine, expect input in radians.
So, maybe keep rotation as degrees, but convert to rads for Cos/Sin: Math.Cos(rotation * Mathf.Deg2Rad); (deg2Rad is just 2PI/360)
But transform.forward, mentioned in the previous reply, is better (as long as the camera isn’t tilted, since forward will gladly move you up if you face up-ish.)