- Home /
Windows Store app - Joystick not working
I have been trying to get joysticks to work in Windows Store apps. It works fine in the editor.
Here is a screenshot of my player settings:
I read that you only need to enable HID, but I enabled everything for the hell of it.
Here is my code:
using UnityEngine; using System.Collections;
public class JoystickControl : MonoBehaviour {
float speed = .02f;
Material mat;
// Use this for initialization
void Start () {
mat = gameObject.GetComponent<Renderer>().material;
}
// Update is called once per frame
void Update () {
mat.color = (Input.GetButton("Fire1")) ? Color.red : Color.white;
Vector3 moveCube = new Vector3(Input.GetAxisRaw("Horizontal"), 0f, Input.GetAxisRaw("Vertical"));
transform.position += moveCube * speed;
}
}
Just a note, the keyboard input (WASD + left mouse click) work in the Windows Store app, it's just the joystick that isn't working.
Is there a setting somewhere that I'm missing that will allow joysticks to work in Windows Store apps?
Thanks!
Your answer
Follow this Question
Related Questions
Character Movement w/ Both Joysticks 0 Answers
Not reading joysticks on the Nintendo switch joycon 0 Answers
Joystick isn't responding? 0 Answers
PS4 controller right analog stick issue 3 Answers