英文:
Wireless controllers don't pick up input using the old input system
问题
I need assistance with a Unity wireless controller issue that I'm encountering. Specifically, I am unable to get input from wireless controllers such as PS4, PS5, and Xbox controllers, while the same controller connected via cable does work. It's worth noting that I am using the old input system in Unity, not the new one. Can someone please help me troubleshoot this issue?
Although the wireless controllers do function correctly when I use the new input system, I'm not prepared to update my project and want to continue using the old input system. I'm hoping to get some suggestions on how to address this issue.
I am using Unity 2021.3.8f1 and 2020.3.36f1
I'm experiencing an issue with my Unity script where it works perfectly fine with wired controllers, but doesn't work with wireless controllers (I am using the old input system in Unity). I've tried using different wireless controllers such as PS4, PS5, and Xbox controllers, but none of them seem to work. I'm hoping to get some guidance on how to make it work with wireless controllers as well.
Update: I am using Unity's legacy input system to detect controller, keyboard, and mouse inputs. All are working fine except wireless controllers.
Here is the simple script, and even I am unable to detect Input.GetAxis("Vertical")
:
using UnityEngine;
public class WirelessController : MonoBehaviour {
public float speed = 10f;
public float rotationSpeed = 100f;
void Update () {
float translation = Input.GetAxis("Vertical") * speed;
float rotation = Input.GetAxis("Horizontal") * rotationSpeed;
translation *= Time.deltaTime;
rotation *= Time.deltaTime;
transform.Translate(0, 0, translation);
transform.Rotate(0, rotation, 0);
}
}
英文:
I need assistance with a Unity wireless controller issue that I'm encountering. Specifically, I am unable to get input from wireless controllers such as PS4, PS5, and Xbox controllers, while the same controller connected via cable does work. It's worth noting that I am using the old input system in Unity, not the new one. Can someone please help me troubleshoot this issue?
Although the wireless controllers do function correctly when I use the new input system, I'm not prepared to update my project and want to continue using the old input system. I'm hoping to get some suggestions on how to address this issue.
I am using Unity 2021.3.8f1 and 2020.3.36f1
I'm experiencing an issue with my Unity script where it works perfectly fine with wired controllers, but doesn't work with wireless controllers (I am using the old input system in Unity). I've tried using different wireless controllers such as PS4, PS5, and Xbox controllers, but none of them seem to work. I'm hoping to get some guidance on how to make it work with wireless controllers as well.
Update: I am using Unity's legacy input system to detect controller, keyboard, and mouse inputs. All are working fine except wireless controllers.
Here is the simple script, and even I am unable to detect Input.GetAxis("Vertical")
:
using UnityEngine;
public class WirelessController : MonoBehaviour {
public float speed = 10f;
public float rotationSpeed = 100f;
void Update () {
float translation = Input.GetAxis("Vertical") * speed;
float rotation = Input.GetAxis("Horizontal") * rotationSpeed;
translation *= Time.deltaTime;
rotation *= Time.deltaTime;
transform.Translate(0, 0, translation);
transform.Rotate(0, rotation, 0);
}
}
答案1
得分: 0
我遇到了相同的问题,有线控制器运作正常,但无线控制器不起作用。正如 @jdweng 所建议的,这似乎是一个驱动程序问题。
然而,将项目升级到版本 2022.2.13f 解决了我的问题。我建议将您的 Unity 升级到 2022.2.13f 或更高版本,因为它继续支持 PS5 开发,并似乎已经修复了无线功能。
英文:
I had the same issue where wired controllers were working fine, but wireless controllers didn't work. It seemed like a driver problem as suggested by @jdweng
However, upgrading the project to version 2022.2.13f fixed the issue for me. I recommend updating your Unity to a version 2022.2.13f or higher, as it continues to support PS5 development and also seems to have fixed the wireless functionality.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论