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) {
Rb.AddForce(transform.TransformDirection(PlayJoystick.Direction)*100f);
}
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.