- Home /
How to use Joystick from Standard Assets?
I am totally a beginner in Unity (Downloaded Unity 3 days ago). I created a simple game and I can move the player with keyboard by using this code -
void FixedUpdate () {
float speed = 250;
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
GetComponent<Rigidbody>().AddForce (movement * speed * Time.deltaTime);
}
However, I want to play the game in Android and for that I need to use joystick. Can anyone tell me how to use the joystick in Standard Assets?
Comment
Your answer
Follow this Question
Related Questions
Count time between scene executions 1 Answer
Unity ads are working in editor but not on android device 2 Answers
How can I stick buttons on my cube and the same time using script? 1 Answer
Unity Multiplayer Android Game 0 Answers
how to make the sprite and the background color in a tile disappear? 0 Answers