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 ?! ![]()
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);
}
}