Move a camera forward

Hey! At the moment I have a Camera facing 45 Degrees down as a sort of overview, I had it translating via the World coordinates and it was working fine until I rotated it left 90 degrees, and the forward translation moved it along the same axis.

I then guessed I would have to use the Local coordinate system which works, but the only problem is due to the 45 Degree tilt it moves forward into the ground.

A way I can see this working is by setting the rotation to 0 degrees, moving the camera and then setting the rotation back to 45 degrees. Though this seems a bit too hacky, is there another way to do this using some sort of scripting?

You could create an empty gameObject and put the parent as its child. You'd then apply the rotation to the camera, but the movement to the gameObject.

Comment back if you're not sure how to do this, and I can explain with further detail.


Alternatively, you could move the camera by Vector.Forward (or Vector.Right, depending on the orientation of your scene), rather than Transform.Forward.