VR camera rotation

I’m trying to do a first-person camera controller for Gear VR and I’m having some problems with the rotation. How it should work: When mouse button is held down, the camera moves in the direction that it’s facing. This works fine while testing in Unity, but not when testing with the Gear VR. Unity automagically tracks the head rotation and rotates the camera according to that. However, the headtracking doesn’t seem to “really” change the rotation of the camera, since the direction of the movement doesn’t change. Script for the movement:

            Vector3 movement = new Vector3();
            movement.z = Input.GetAxis("Vertical");
            transform.Translate(movement * Time.deltaTime * moveSpeed);

So when I hold the touchpad, it moves along the camera’s (or the camera’s parent object’s) z-axis, no matter where I’m looking at. This has troubled me for a few days now and I just can’t get it working.
(If you know the VR horror game Affected: The Manor, that’s the kind of movement system that I’m trying to achieve. )

I found a way around this, from this tutorial. I added a Character Controller component for the CameraContainer object, and added the following script for the CameraContainer:

public class VRcameraMovement : MonoBehaviour {

    public Transform vrCamera;
    public float moveSpeed = 5.0f;  
    private CharacterController CharCont;

    // Use this for initialization
    void Start () {

        CharCont = GetComponent<CharacterController>();
		
	}
	
	// Update is called once per frame
	void Update () {

        if (Input.GetMouseButton(0))
        {
            Vector3 forward = vrCamera.TransformDirection(Vector3.forward);

            CharCont.SimpleMove(forward * moveSpeed * Time.deltaTime);

        }
    }
}