Raylib-cs
Raylib-cs copied to clipboard
[Core] Gamepad axis is not correct.
Before submitting a new issue, please verify and check:
- [x] The issue is specific to Raylib-cs and not raylib
- [x] I checked there is no similar issue already reported
- [x] My code has no errors or misuse of Raylib-cs
Issue description
GetGamepadAxisMovement() does not returns correct values. It seem trying to print a object or move it around only lets it move 8 ways not 360...
Environment
OS: KDE neon 5.25 Processors: 16 x AMD Ryzen 7 5700G with Radeon Graphics Graphics Procceser: AMD RENOIR
Issue screenshot
Na
Code example
protected override void OnUpdate()
{
base.OnUpdate();
//Physics.VX = (Input["Right"].GetValue(0.25f) - Input["Left"].GetValue(0.25f)) * Speed;
//Physics.VY = (Input["Down" ].GetValue(0.25f) - Input["Up" ].GetValue(0.25f)) * Speed;
//Console.WriteLine("VX:"+Physics.VX);
Physics.VX = Raylib_cs.Raylib.GetGamepadAxisMovement(0, Raylib_cs.GamepadAxis.GAMEPAD_AXIS_LEFT_X);
Physics.VY = Raylib_cs.Raylib.GetGamepadAxisMovement(0, Raylib_cs.GamepadAxis.GAMEPAD_AXIS_LEFT_Y);
}
protected override void OnUpdate()
{
base.OnUpdate();
Console.WriteLine
(
"AXIS X:"+Raylib_cs.Raylib.GetGamepadAxisMovement(0, Raylib_cs.GamepadAxis.GAMEPAD_AXIS_LEFT_X) + ", "+
"AXIS Y:"+Raylib_cs.Raylib.GetGamepadAxisMovement(0, Raylib_cs.GamepadAxis.GAMEPAD_AXIS_LEFT_Y)
);
}