Controll 3D Rigidbody Projectile with Joystick

Basically I shoot a 3D projectile, the camera then follows the projectile and what I wanted to do is to controll that projectile with the joystick.

Right now I have this on the FixedUpdate:

    if (IsFollowingBall) {

The problem with this code is that, if I push the Joystick to the right (for example), the Ball will move to the right BUT at the worlds coordinates, which means that once the ball movement is aligned with the Right axis of the World it will keep following that Right Axis (thus moving forward on that axis now). What I wanted is for it to move to the Right but related to the ball itself.

Thanks in advance.

After testing your code, I found that the object is already moving relative to its local coordinates. After all, the TransformDirection() function already translates the joystick vector into local coordinates. Most likely, your projectile is not rotated in the required direction. This can be done, for example, like this:

Rb.transform.forward = Rb.velocity;