Modifying Movement...

So, I have a model, where the gun is animated and shooting…

I have the character face the mouse position, but when I apply an offset of 45º, now the gun is aiming at the correct/desired location… However, now the models “front” is 45º off.

My Movement Script is:

        CharacterController controller = GetComponent<CharacterController>();
        if (controller.isGrounded)
        {
            moveDirection = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));

            print(moveDirection);

            moveDirection = transform.TransformDirection(moveDirection) ;
            moveDirection *= Speed;
            if (Input.GetButton("Jump"))
                moveDirection.y = jumpSpeed;

        }
        moveDirection.y -= Gravity * Time.deltaTime;
        controller.Move(moveDirection * Time.deltaTime);

is there a way to fix this? Via the code?

Try making another GameObject to hold the model, and make that a child of the main GameObject, and only rotate the child. This gives the gun a rotated appearance, but still keeps the main GameObjects forward position the same.