I'm doing a little application in unity, a sphere with two joysticks, the first joystick moves to that sphere and the second one zooms, the problem is that I do not know how to call the second joysctik to write the necessary code, because what I have done and the configuration goes to the first joystick.
This is the one joystick code
public class Controller : MonoBehaviour {
private Joystick joystick;
private JoyButton joybutton;
public float velocidad;
// Use this for initialization
void Start ()
{
joystick = FindObjectOfType<Joystick>();
}
// Update is called once per frame
void Update ()
{
var rb = GetComponent<Rigidbody>();
rb.velocity = new Vector3(joystick.Horizontal * velocidad, 0.0f, joystick.Vertical * velocidad);
}
}