How to only charge(dash) in one direction?

I’m trying to make a charge that will only propel you in the direction you are facing. What I want is when you are charging, no matter how you rotate, you will still be propelled in the direction you were facing when you did the charge.
Here is the charge script I’m currently using:

  private void FixedUpdate()
    {
        Vector3 moveDirection = walk.Cc.transform.forward * dashspeed;

        if (isdashing)
        {
            walk.Cc.Move(moveDirection * dashspeed * Time.deltaTime);
        }
    }

please note that “walk” is the script that holds “Cc” (character controller)

Please and thank you very much.

Make a private variable, something like private Vector3 _dashDirection; and do _dashDirection = walk.Cc.transform.forward; when you press the dash button. Change Vector3 moveDirection = walk.Cc.transform.forward * dashspeed; to Vector3 moveDirection = _dashDirection * dashspeed;.