How to change move direction

So, i just finished the Roll-a-Ball tutorial and now i want to continue with this game.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour {
    private Rigidbody rb;
    private float speed;
    // Use this for initialization
    void Start () {
        
        rb = GetComponent<Rigidbody>();
        speed = 5;
       }

    
    

	
	// Update is called once per frame
	void FixedUpdate () {
        float moveHorizontal = Input.GetAxis("Horizontal");
        float moveVertical = Input.GetAxis("Vertical");
        float horizontalRotation = Input.GetAxis("HorizontalRotation");
        
        Vector3 move = new Vector3(moveVertical , 0, -moveHorizontal);
        rb.AddForce(move * speed);
    }
}

I used the inputs Q and E in “HorizontalRotation” to rotate the camera left and right (in another script), and now i want to also change the movemet direction with this inputs.
I mean after i rotate the camera, when i press W i want the ball to move in camera’s direction, not same direction.
Please help me. PS: I’m beginner.

@CyberRedRo Hmmm… Maybe you could parent the ball to the Camera (or vise-versa, not sure which to get it to work). You could also get the camera’s position and update the ball’s position, which would most likely be the better option. Simply have the ball get a reference to the Camera and then have the ball’s transform.position be equal to the camera’s transform.position. The script would look something like this:

 public class YourBallScript()

 {
      public Camera CameraReference; //Getting a reference to the camera.

      void Start ()
      {
             CameraReference = GameObject.Find("Camera"); //I assume the ball and the camera are not parented and/or the camera is not a component of the ball, so you would need to find the Camera game object with the exact name as the Camera game object. If you didn't know, Unity is actually VERY case Sensitive. Putting GameObject.Find("camera") would throw an error because that isn't the exact name of the object.
      }

      void Update ()
      {
            transform.position = CameraReference.transform.position //Setting the ball's position equal to the camera's position. You'd use transform.position because this script would be on the ball.
       }

       //You would have your other things below this point.
 }

If this helped, then I hope you go on to be extremely famous because you made tons of brilliant games.

Remove the following code:

Vector3 move = new Vector3(moveVertical , 0, -moveHorizontal);
         rb.AddForce(move * speed);

Replace with:

// Get the transform of the camera
Transform cameraTransform = Camera.main.transform;

// get the move direciton
Vector3 dir = ball.transform.position - cameraTransform.position ;

 //  Create Move Vector
Vector3 move = new Vector3(dir.x * moveVertical , 0, dir.z * -moveHorizontal);

// Force Forward/backward
rb.AddForce(move * speed);

I just managed to solve the problem. My camera is child of another emty object named “Camera pointer”
My CameraPointer is allways in the exact position as the ball and it is rotating when i press Q and E.
so i used a reference to this object named “cameraPointer” and i used this variable to change the direction :

void FixedUpdate () {
        float moveHorizontal = Input.GetAxis("Horizontal");
        float moveVertical = Input.GetAxis("Vertical");

        rb.AddForce(cameraPointer.transform.right * moveVertical * speed);
        rb.AddForce(cameraPointer.transform.forward * -moveHorizontal * speed);
    }

Thanks all of you for help.