I want to know if there is a way to control a 3d boat with a joystick to publish the game on android devices. The boat moves only when using desktop keys. I am using this C# code:
void Update ()
{
float h = Input.GetAxis("Horizontal");
float v = Input.GetAxis("Vertical");
rbody.AddTorque(0f,h*turnSpeed*Time.deltaTime,0f);
rbody.AddForce(transform.forward*v*accellerateSpeed*Time.deltaTime);
}
How to change it to have a moving boat on android with a joystick?