try to integrate Ultimate joystick but the ball doesnt move...appreciate for help!

I try to integrate Ultimate joystick from unity assetstore, But i have do that the documents shows and i get no error . But the ball dont move ?! :frowning:

CODE

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

public class BallController : MonoBehaviour {

// public float ballSpeed;
// private float ySpeed;

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
// float xSpeed = Input.GetAxis(“Movement”);
// float ySpeed = Input.GetAxis(“Movement”);

//THIS TWO ROWS BELOW TO INTEGRATE ULTIMATE JOYSTICK!

Vector2 moveDirection = UltimateJoystick.GetPosition(“Movement”);

Vector2 movement = new Vector2(moveDirection.x, moveDirection.y);

Rigidbody body = GetComponent ();

// body.AddTorque(new Vector3(xSpeed, 0, ySpeed) * ballSpeed * Time.deltaTime);

// body.AddTorque (new Vector3(xSpeed, 0, ySpeed) * ballSpeed * Time.deltaTime);

}
}

See the sticky about how you need to use code tags on the forum. People aren’t going to bother with helping you if you can’t be bothered to make it easy to read your code. Common courtesy.

Secondly, I don’t see where you’re actually using moveDirection for anything other than creating the movement Vector2 which should be no different than movedirection. Nowhere in the code you posted are you actually using moveDirection to apply any movement or force to the ball.

Once you get the moveDirection Vector2 from UltimateJoystick you have to actually do something with that information, and it needs to be more than just creating new Vector2 duplicates of it. Good luck