Open Shadowblitz16 opened 5 years ago
example code :
class ISSUE_81 : Scene
{
string info = "";
public override void Draw()
{
Graphics.Print(info);
}
public override void Update(float dt)
{
info = "";
foreach (var j in Joystick.GetJoysticks())
{
info += ("-----------" + j.GetGUID() + "\n");
for (var ji = 0; ji < j.GetAxisCount(); ji++) // start by 0
{
if (Mathf.Abs(j.GetAxis(ji)) > 0)
info += (ji.ToString() + " " + j.GetAxis(ji) + "\n");
}
foreach (var ga in (GamepadAxis[])System.Enum.GetValues(typeof(GamepadAxis)))
{
if (Mathf.Abs(j.GetGamepadAxis(ga)) > 0)
info += (ga.ToString() + " " + j.GetGamepadAxis(ga) + "\n");
}
}
}
}
ok cool I will try this out
is there a way to all the joysticks axes values? I have tried doing this..
and this
but the first seems to only update my buttonData's Left Trigger and the other returns really strange values like -1 when I am not pressing anything.
btw d is my BtnMap while this is from my BtnMapGroup I am trying to make bindable controls.